author | Claus Gittinger <cg@exept.de> |
Tue, 14 Aug 2012 10:49:39 +0200 | |
changeset 11748 | 880356e33f08 |
parent 11715 | efa49c4a4f56 |
child 11749 | 213908da088d |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
8908 | 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 |
8962 | 15 |
instanceVariableNames:'listView labelView workspace inspectedObject selectedLine nShown |
9557
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
16 |
hasMore monitorProcess hideReceiver integerDisplayRadix |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
17 |
inspectHistory allowFollow isStandaloneInspector selectionIndex |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
18 |
object inspectedObjectHolder displayStringMessage |
9630 | 19 |
suppressPseudoSlots dereferenceValueHolders suppressHeadline |
11629 | 20 |
headLineLabel sortOrder' |
10846 | 21 |
classVariableNames:'DefaultIcon IdDictionary NextSequentialID LastExtent |
11230 | 22 |
DefaultIntegerDisplayRadix ExpandArraysInAllLists' |
8962 | 23 |
poolDictionaries:'' |
24 |
category:'Interface-Inspector' |
|
0 | 25 |
! |
26 |
||
871 | 27 |
!InspectorView class methodsFor:'documentation'! |
29 | 28 |
|
29 |
copyright |
|
30 |
" |
|
31 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
8908 | 32 |
All Rights Reserved |
29 | 33 |
|
34 |
This software is furnished under a license and may be used |
|
35 |
only in accordance with the terms of that license and with the |
|
36 |
inclusion of the above copyright notice. This software may not |
|
37 |
be provided or otherwise made available to, or used by, any |
|
38 |
other person. No title to or ownership of the software is |
|
39 |
hereby transferred. |
|
40 |
" |
|
41 |
! |
|
42 |
||
43 |
documentation |
|
44 |
" |
|
1570 | 45 |
This class implements a graphical inspector. |
29 | 46 |
Inspecting can be done on an object - |
47 |
(where its instvarnames/values are inspected) |
|
1570 | 48 |
or a list of objects (where a nameArray/valuesArray is inspected). |
29 | 49 |
The later is used by the debugger to inspect method variables/args. |
50 |
||
51 |
The system calls the inspector through the global variable 'Inspector' |
|
52 |
which is bound to this class (but could be redefined - it actually is |
|
1570 | 53 |
set to MiniInspector in a smalltalk without graphical user interface, |
54 |
or to NewInspector if that is wanted). |
|
0 | 55 |
|
29 | 56 |
Also notice, that there are two methods to inspect an object: |
57 |
sending #basicInspect to any object, will open this kind of inspector on |
|
58 |
it (showing instance variables which are physically present). |
|
59 |
||
60 |
Sending it #inspect, will - depending on the object - sometimes invoke a |
|
61 |
specialized inspector. |
|
1570 | 62 |
(see OrderedCollectionInspectorView, ImageInspectorView, |
63 |
ColorInspectorView etc. as examples). |
|
29 | 64 |
|
446 | 65 |
You can also open a monitoring inspector, which displays some instance |
66 |
variable in regular intervals. See #openOn:monitor:. |
|
67 |
||
29 | 68 |
examples: |
2008
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
69 |
#(1 2 3 4) asOrderedCollection inspect |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
70 |
#(1 2 3 4) asOrderedCollection basicInspect |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
71 |
(Array new:10000) inspect |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
72 |
(Image fromFile:'bitmaps/claus.gif') inspect |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
73 |
(Image fromFile:'bitmaps/claus.gif') basicInspect |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
74 |
(Image fromFile:'bitmaps/SBrowser.xbm') inspect |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
75 |
(Image fromFile:'bitmaps/SBrowser.xbm') basicInspect |
446 | 76 |
|
2008
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
77 |
InspectorView openOn:Display |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
78 |
InspectorView openOn:Display monitor:'shiftDown' |
11660 | 79 |
InspectorView openOn:(Image fromScreen) |
80 |
InspectorView openOn:(Image fromFile:'banner8.xpm') |
|
2008
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
81 |
|
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
82 |
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
|
83 |
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
|
84 |
inspector from changing the topViews window label. |
510 | 85 |
|
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
86 |
Notice: |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
87 |
the instvars 'inspectedObject' and 'selectedLine' have been |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
88 |
renamed to 'object' and 'selectionIndex' for squeak compatibility; |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
89 |
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
|
90 |
smooth migration. |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
91 |
|
6940 | 92 |
Controlling the contents from the inspected object. |
93 |
||
94 |
By redefining inspectorExtraAttributes or inspectorExtraNamedFields, the inspected |
|
95 |
object can add items to the list of fields as ashown in the left list-view of the inspector. |
|
96 |
These methods are meant to return a sequencable Collection of Associations, which represent |
|
97 |
of pseudo slot-name, slot-value pairs. |
|
98 |
In the list, extra attributes are shown with a dash (-), extra named fields are marked with a tick (`). |
|
99 |
These are added (read only) to the list. |
|
100 |
||
510 | 101 |
[author:] |
2008
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
102 |
Claus Gittinger |
29 | 103 |
" |
104 |
! ! |
|
0 | 105 |
|
871 | 106 |
!InspectorView class methodsFor:'instance creation'! |
0 | 107 |
|
200 | 108 |
for:anObject |
109 |
"create and launch a new inspector for anObject. |
|
110 |
This protocol is a historic leftover - this method will vanish." |
|
111 |
||
112 |
^ self openOn:anObject |
|
113 |
! |
|
114 |
||
115 |
inspect:anObject |
|
116 |
"create and launch a new inspector for anObject. |
|
117 |
This protocol is a historic leftover - this method will vanish." |
|
118 |
||
119 |
^ self openOn:anObject |
|
120 |
! |
|
121 |
||
0 | 122 |
openOn:anObject |
123 |
"create and launch a new inspector for anObject" |
|
124 |
||
416
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
125 |
^ self openOn:anObject monitor:nil |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
126 |
|
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 |
InspectorView openOn:(5 @ 7) |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
129 |
InspectorView openOn:(Array new:400) |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
130 |
DictionaryInspectorView openOn:(IdentityDictionary new) |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
131 |
" |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
132 |
|
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
133 |
"Modified: 1.3.1996 / 19:31:03 / cg" |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
134 |
! |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
135 |
|
8452 | 136 |
openOn:anObject monitor:anInstVarNameOrNil |
416
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
137 |
"create and launch a new inspector for anObject. |
8452 | 138 |
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
|
139 |
(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
|
140 |
|
105 | 141 |
|topView inspectorView| |
0 | 142 |
|
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
143 |
topView := StandardSystemView new. |
9295 | 144 |
topView |
145 |
icon:self defaultIcon; |
|
146 |
label:'Inspector'; |
|
147 |
iconLabel:'Inspector'; |
|
148 |
extent:self defaultTopViewExtent; |
|
149 |
objectAttributeAt:#rememberExtent put:true. |
|
0 | 150 |
|
151 |
inspectorView := self origin:(0.0 @ 0.0) |
|
2007 | 152 |
corner:(1.0 @ 1.0) |
153 |
in:topView. |
|
0 | 154 |
|
3 | 155 |
"kludge: must realize first, to be able to set menu again" |
352 | 156 |
topView openAndWait. |
871 | 157 |
topView windowGroup |
2007 | 158 |
focusSequence:(Array |
159 |
with:inspectorView listView |
|
160 |
with:inspectorView workspace). |
|
9262 | 161 |
inspectorView |
162 |
allowFollow:true; |
|
163 |
isStandaloneInspector:true; |
|
164 |
inspect:anObject. |
|
416
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
165 |
|
8452 | 166 |
anInstVarNameOrNil notNil ifTrue:[ |
167 |
inspectorView monitor:anInstVarNameOrNil |
|
416
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
168 |
]. |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
169 |
|
69 | 170 |
^ inspectorView |
0 | 171 |
|
29 | 172 |
" |
416
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
173 |
|m| |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
174 |
|
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
175 |
m := 1 asValue. |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
176 |
InspectorView openOn:m monitor:'value'. |
871 | 177 |
|
178 |
2 to:10 do:[:i | |
|
2007 | 179 |
Delay waitForSeconds:1. |
180 |
m value:i |
|
871 | 181 |
] |
416
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 |
|
29 | 184 |
" |
416
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
185 |
|o| |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
186 |
|
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
187 |
o := Array with:1 with:2 with:3. |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
188 |
InspectorView openOn:o monitor:'2'. |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
189 |
Delay waitForSeconds:1. |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
190 |
o at:2 put:20 |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
191 |
" |
fd30ab6185c7
added startup-with-monitor method
Claus Gittinger <cg@exept.de>
parents:
383
diff
changeset
|
192 |
|
7867 | 193 |
"Created: / 01-03-1996 / 19:30:50 / cg" |
194 |
"Modified: / 23-10-2007 / 19:08:21 / cg" |
|
2235
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 |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
198 |
^ self openOn:anObject |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
199 |
! |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
200 |
|
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
201 |
openOn:anObject withEvalPane:withEvalPane withLabel:aLabel |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
202 |
^ self openOn:anObject |
73 | 203 |
! ! |
204 |
||
10321 | 205 |
!InspectorView class methodsFor:'common label support'! |
206 |
||
207 |
commonLabelFor:anObject |
|
208 |
"return the windowLabel to use in my topView, when inspecting anObject. |
|
209 |
Identical objects are labelled with the same id, which makes it easy to |
|
210 |
see if two objects are identical (and is very useful, indeed). |
|
211 |
WARNING: used by both Inspector and Inspector2 !!!!!!" |
|
212 |
||
11658
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
213 |
|lbl id extra| |
10321 | 214 |
|
215 |
lbl := ''. |
|
216 |
(anObject isImmediate |
|
217 |
or:[anObject isBoolean]) ifFalse:[ |
|
218 |
lbl := '<%2> ' |
|
219 |
]. |
|
11658
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
220 |
lbl := lbl , '%1%3'. |
10321 | 221 |
|
222 |
IdDictionary isNil ifTrue:[ |
|
223 |
IdDictionary := WeakIdentityDictionary new. |
|
224 |
]. |
|
225 |
[ |
|
226 |
id := IdDictionary |
|
227 |
at:anObject |
|
228 |
ifAbsentPut:[ |
|
229 |
|nextID| |
|
230 |
||
231 |
nextID := NextSequentialID ? 0. |
|
232 |
NextSequentialID := nextID + 1. |
|
233 |
nextID |
|
234 |
]. |
|
235 |
] valueUninterruptably. |
|
236 |
||
11658
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
237 |
extra := ''. |
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
238 |
"/ the following should be provided by the inspected object (labelInInspector) |
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
239 |
anObject isImage ifTrue:[ |
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
240 |
anObject fileName notNil ifTrue:[ |
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
241 |
extra := ' (', anObject fileName asFilename baseName,')' |
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
242 |
] |
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
243 |
]. |
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
244 |
|
10321 | 245 |
^ self classResources |
246 |
string:lbl |
|
247 |
with:(self labelNameFor:anObject) |
|
248 |
with:id |
|
11658
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
249 |
with:extra |
10321 | 250 |
|
251 |
"Created: / 15-07-2011 / 16:21:44 / cg" |
|
252 |
! |
|
253 |
||
254 |
labelNameFor:anObject |
|
255 |
"return the iconLabel to use in my topView, when inspecting anObject. |
|
256 |
Simply returns the className or name of anObjects class" |
|
257 |
||
258 |
|s| |
|
259 |
||
260 |
anObject isClass ifTrue:[ |
|
261 |
s := anObject displayString |
|
262 |
] ifFalse:[ |
|
263 |
(anObject isImmediate |
|
264 |
or:[anObject isBoolean]) ifTrue:[ |
|
265 |
s := anObject printString , ', ' , anObject classNameWithArticle |
|
266 |
] ifFalse:[ |
|
267 |
s := anObject classNameWithArticle |
|
268 |
]. |
|
269 |
]. |
|
270 |
s isNil ifTrue:[ |
|
271 |
anObject isBehavior ifTrue:[ |
|
272 |
^ 'someBehavior' |
|
273 |
]. |
|
274 |
^ 'something' |
|
275 |
]. |
|
276 |
^ s |
|
277 |
||
278 |
"Created: / 15-07-2011 / 16:20:06 / cg" |
|
279 |
! ! |
|
280 |
||
871 | 281 |
!InspectorView class methodsFor:'defaults'! |
73 | 282 |
|
1873
5fd55aa184d4
added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents:
1855
diff
changeset
|
283 |
defaultExtent |
9389 | 284 |
^ (Screen current usableExtent // 3) |
1873
5fd55aa184d4
added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents:
1855
diff
changeset
|
285 |
|
5fd55aa184d4
added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents:
1855
diff
changeset
|
286 |
"Created: / 7.9.1998 / 13:47:45 / cg" |
5fd55aa184d4
added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents:
1855
diff
changeset
|
287 |
"Modified: / 7.9.1998 / 14:15:38 / cg" |
5fd55aa184d4
added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents:
1855
diff
changeset
|
288 |
! |
5fd55aa184d4
added redefinable #defaultExtent method.
Claus Gittinger <cg@exept.de>
parents:
1855
diff
changeset
|
289 |
|
73 | 290 |
defaultIcon |
1146 | 291 |
"return the browsers default window icon" |
292 |
||
7835 | 293 |
<resource: #programImage> |
7629 | 294 |
<resource: #style (#INSPECTOR_ICON #INSPECTOR_ICON_FILE)> |
1146 | 295 |
|
7629 | 296 |
|nm i resources| |
1146 | 297 |
|
298 |
(i := DefaultIcon) isNil ifTrue:[ |
|
7629 | 299 |
resources := self classResources. |
300 |
i := resources at:#INSPECTOR_ICON default:nil. |
|
2338 | 301 |
i isNil ifTrue:[ |
7629 | 302 |
nm := resources at:#INSPECTOR_ICON_FILE default:'Inspector.xbm'. |
2475 | 303 |
i := Smalltalk imageFromFileNamed:nm forClass:self. |
2338 | 304 |
i isNil ifTrue:[ |
2454
114111038a2b
try my bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
2447
diff
changeset
|
305 |
i := StandardSystemView defaultIcon |
2338 | 306 |
] |
307 |
]. |
|
308 |
i notNil ifTrue:[ |
|
309 |
DefaultIcon := i := i onDevice:Display |
|
310 |
] |
|
73 | 311 |
]. |
1146 | 312 |
^ i |
874 | 313 |
|
7629 | 314 |
" |
315 |
DefaultIcon := nil |
|
316 |
" |
|
7835 | 317 |
|
318 |
"Modified: / 17-09-2007 / 11:36:17 / cg" |
|
7867 | 319 |
! |
320 |
||
11247
992680ca31b0
added: #defaultIntegerDisplayRadix
Claus Gittinger <cg@exept.de>
parents:
11232
diff
changeset
|
321 |
defaultIntegerDisplayRadix |
992680ca31b0
added: #defaultIntegerDisplayRadix
Claus Gittinger <cg@exept.de>
parents:
11232
diff
changeset
|
322 |
^ DefaultIntegerDisplayRadix ? 10 |
992680ca31b0
added: #defaultIntegerDisplayRadix
Claus Gittinger <cg@exept.de>
parents:
11232
diff
changeset
|
323 |
|
992680ca31b0
added: #defaultIntegerDisplayRadix
Claus Gittinger <cg@exept.de>
parents:
11232
diff
changeset
|
324 |
"Created: / 10-02-2012 / 19:51:38 / cg" |
992680ca31b0
added: #defaultIntegerDisplayRadix
Claus Gittinger <cg@exept.de>
parents:
11232
diff
changeset
|
325 |
! |
992680ca31b0
added: #defaultIntegerDisplayRadix
Claus Gittinger <cg@exept.de>
parents:
11232
diff
changeset
|
326 |
|
7867 | 327 |
defaultTopViewExtent |
9389 | 328 |
|def| |
329 |
||
330 |
def := LastExtent ? self defaultExtent. |
|
331 |
^ def min:(Screen current usableExtent) |
|
7867 | 332 |
|
333 |
"Created: / 23-10-2007 / 19:04:13 / cg" |
|
334 |
! |
|
335 |
||
11230 | 336 |
expandArraysInAllLists |
337 |
"in the 'all instvars' list, expand arrays" |
|
338 |
||
339 |
^ ExpandArraysInAllLists ? false |
|
340 |
||
341 |
"Created: / 30-01-2012 / 16:52:57 / cg" |
|
342 |
! |
|
343 |
||
344 |
expandArraysInAllLists:aBoolean |
|
345 |
"in the 'all instvars' list, expand arrays" |
|
346 |
||
347 |
ExpandArraysInAllLists := aBoolean |
|
348 |
||
349 |
"Created: / 30-01-2012 / 16:53:01 / cg" |
|
350 |
! |
|
351 |
||
7867 | 352 |
rememberLastExtent:anExtent |
353 |
LastExtent := anExtent |
|
354 |
||
355 |
"Created: / 23-10-2007 / 19:10:02 / cg" |
|
73 | 356 |
! ! |
357 |
||
11511 | 358 |
!InspectorView class methodsFor:'image specs'! |
359 |
||
11514 | 360 |
imageFor_arrays |
361 |
"This resource specification was automatically generated |
|
362 |
by the ImageEditor of ST/X." |
|
363 |
||
364 |
"Do not manually edit this!! If it is corrupted, |
|
365 |
the ImageEditor may not be able to read the specification." |
|
366 |
||
367 |
" |
|
368 |
self imageFor_arrays inspect |
|
369 |
ImageEditor openOnClass:self andSelector:#imageFor_arrays |
|
370 |
Icon flushCachedIcons |
|
371 |
" |
|
372 |
||
373 |
<resource: #image> |
|
374 |
||
375 |
^Icon |
|
376 |
constantNamed:'InspectorView class imageFor_arrays' |
|
377 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
378 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@T5EQT4@@@@@@@@@@@@AOTUAPBU@IS0@@@@@@@@AOTP%PBUAQ |
|
379 |
T %O@@@@@@@@T0$IBP$ITUHIO0@@@@@@@EEPBU@ITUIRBSD@@@@@@@AQBP$IBP%RO0$1@@@@@@@@T5HIT %RO3DIO0@@@@@@@D=RT%HILSEJBR<@@@@@@@@@ |
|
380 |
S3D1LP%JBR<@@@@@@@@@@@AOO3D1O2<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0 206 99 132 156 74 99 206 66 107 115 16 49 255 16 90 189 0 57 132 16 49 206 0 57 198 123 140 255 49 123 255 33 99 222 0 66 99 0 24 239 0 66 255 0 74 255 140 214 148 0 41 140 49 74 198 123 148 255 0 82 90 0 24 132 0 41 206 99 123 156 0 41 198 0 57 74 0 24 255 16 82 214 0 66 90 0 33 189 0 49 107 0 33 206 16 74 214 8 66 218 112 214 255 0 255 208 32 144 199 21 133 186 85 211]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
381 |
! |
|
382 |
||
11511 | 383 |
imageFor_characters |
384 |
"This resource specification was automatically generated |
|
385 |
by the ImageEditor of ST/X." |
|
386 |
||
387 |
"Do not manually edit this!! If it is corrupted, |
|
388 |
the ImageEditor may not be able to read the specification." |
|
389 |
||
390 |
" |
|
391 |
self imageFor_characters inspect |
|
392 |
ImageEditor openOnClass:self andSelector:#imageFor_characters |
|
393 |
Icon flushCachedIcons |
|
394 |
" |
|
395 |
||
396 |
<resource: #image> |
|
397 |
||
398 |
^Icon |
|
399 |
constantNamed:'InspectorView class imageFor_characters' |
|
400 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
401 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTDIOC-FQ@@@@@@@@@A@MP$IBP$I |
|
402 |
Q$U@@@@@@@@@L@%SOP%HRP$>M@@@@@@@@D4<BP$IS#MEP4H@@@@@@@AMNUP9BP$IP3)B@@@@@@@@L@$3R0%EP0%GLP@@@@@@@D@>BP$IBP%RQ2<@@@@@@@@@ |
|
403 |
K$1LBT]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0 206 99 132 156 74 99 206 66 107 115 16 49 255 16 90 189 0 57 132 16 49 206 0 57 198 123 140 255 49 123 255 33 99 222 0 66 99 0 24 239 0 66 255 0 74 255 140 214 148 0 41 140 49 74 198 123 148 255 0 82 90 0 24 132 0 41 206 99 123 156 0 41 198 0 57 74 0 24 255 16 82 214 0 66 90 0 33 189 0 49 107 0 33 206 16 74 214 8 66 173 0 49 115 0 33 181 0 49 74 0 16 255 8 82 231 0 66]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
404 |
! |
|
405 |
||
406 |
imageFor_classes |
|
407 |
"This resource specification was automatically generated |
|
408 |
by the ImageEditor of ST/X." |
|
409 |
||
410 |
"Do not manually edit this!! If it is corrupted, |
|
411 |
the ImageEditor may not be able to read the specification." |
|
412 |
||
413 |
" |
|
414 |
self imageFor_classes inspect |
|
415 |
ImageEditor openOnClass:self andSelector:#imageFor_classes |
|
416 |
Icon flushCachedIcons |
|
417 |
" |
|
418 |
||
419 |
<resource: #image> |
|
420 |
||
421 |
^Icon |
|
422 |
constantNamed:'InspectorView class imageFor_classes' |
|
423 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
11517 | 424 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTEAOC-FQ@@@@@@@@@A@MT 2M3\; |
425 |
Q$U@@@@@@@@@LD!!HRD!!HRTX>M@@@@@@@@D4<RC\8S$%FP4H@@@@@@@AMNS$9MST3P3)B@@@@@@@@LCL3R4,3P4)GLP@@@@@@@D@>O#8>R$)JQ2<@@@@@@@@@ |
|
426 |
K$1LP$]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 0 215 231 0 125 132 0 143 156 128 142 132 49 248 255 0 166 181 140 255 240 0 207 222 33 240 255 0 70 74 0 89 99 0 102 107 0 136 148 0 180 189 0 82 90 8 239 255 16 235 255 0 158 173 127 206 99 95 156 74 100 206 66 44 115 16 78 255 16 48 189 0 43 132 16 47 206 0 136 198 123 113 255 49 88 255 33 55 222 0 19 99 0 54 239 0 61 255 0 208 255 140 34 148 0 69 140 49 144 198 123 69 255 0 19 90 0 34 132 0 118 206 99 33 156 0 47 198 0 20 74 0 70 255 16 55 214 0 28 90 0 40 189 0 28 107 0 64 206 16 56 214 8]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
11511 | 427 |
! |
428 |
||
11514 | 429 |
imageFor_collections |
430 |
"This resource specification was automatically generated |
|
431 |
by the ImageEditor of ST/X." |
|
432 |
||
433 |
"Do not manually edit this!! If it is corrupted, |
|
434 |
the ImageEditor may not be able to read the specification." |
|
435 |
||
436 |
" |
|
437 |
self imageFor_collections inspect |
|
438 |
ImageEditor openOnClass:self andSelector:#imageFor_collections |
|
439 |
Icon flushCachedIcons |
|
440 |
" |
|
441 |
||
442 |
<resource: #image> |
|
443 |
||
444 |
^Icon |
|
445 |
constantNamed:'InspectorView class imageFor_collections' |
|
446 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
447 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@T5EQT4@@@@@@@@@@@@AOBUAPTE@IS0@@@@@@@@AOBUAPTEAQ |
|
448 |
T %O@@@@@@@@T0%PTEAPTUHIO0@@@@@@@EDITEAPTUIRBSD@@@@@@@AQBU@IT%DIO0$1@@@@@@@@T0%RT%IRO3DIO0@@@@@@@D<IT%IRLSEJBR<@@@@@@@@@ |
|
449 |
S0$1LSEJBR<@@@@@@@@@@@AOO3D1O2<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0 206 99 132 156 74 99 206 66 107 115 16 49 255 16 90 189 0 57 132 16 49 206 0 57 198 123 140 255 49 123 255 33 99 222 0 66 99 0 24 239 0 66 255 0 74 255 140 214 148 0 41 140 49 74 198 123 148 255 0 82 90 0 24 132 0 41 206 99 123 156 0 41 198 0 57 74 0 24 255 16 82 214 0 66 90 0 33 189 0 49 107 0 33 206 16 74 214 8 66 218 112 214 255 0 255 208 32 144 199 21 133 186 85 211]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
450 |
! |
|
451 |
||
452 |
imageFor_dictionaries |
|
453 |
"This resource specification was automatically generated |
|
454 |
by the ImageEditor of ST/X." |
|
455 |
||
456 |
"Do not manually edit this!! If it is corrupted, |
|
457 |
the ImageEditor may not be able to read the specification." |
|
458 |
||
459 |
" |
|
460 |
self imageFor_dictionaries inspect |
|
461 |
ImageEditor openOnClass:self andSelector:#imageFor_dictionaries |
|
462 |
Icon flushCachedIcons |
|
463 |
" |
|
464 |
||
465 |
<resource: #image> |
|
466 |
||
467 |
^Icon |
|
468 |
constantNamed:'InspectorView class imageFor_dictionaries' |
|
469 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
470 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@T5EQT4@@@@@@@@@@@@AOTUAPTEARS0@@@@@@@@AOTU@HTE@I |
|
471 |
BEIO@@@@@@@@T5APBP!!PTUIRO0@@@@@@@EDIBP$I@P$HO3D@@@@@@@AQTUDIBEIRO3D1@@@@@@@@T5IRBEIRBP!!JO0@@@@@@@D=RT%H?LSEJR"<@@@@@@@@@ |
|
472 |
S3D1LT(IBB<@@@@@@@@@@@AOO3D1O2<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0 206 99 132 156 74 99 206 66 107 115 16 49 255 16 90 189 0 57 132 16 49 206 0 57 198 123 140 255 49 123 255 33 99 222 0 66 99 0 24 239 0 66 255 0 74 255 140 214 148 0 41 140 49 74 198 123 148 255 0 82 90 0 24 132 0 41 206 99 123 156 0 41 198 0 57 74 0 24 255 16 82 214 0 66 90 0 33 189 0 49 107 0 33 206 16 74 214 8 66 218 112 214 255 0 255 208 32 144 199 21 133 186 85 211]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
473 |
! |
|
474 |
||
11511 | 475 |
imageFor_false |
476 |
"This resource specification was automatically generated |
|
477 |
by the ImageEditor of ST/X." |
|
478 |
||
479 |
"Do not manually edit this!! If it is corrupted, |
|
480 |
the ImageEditor may not be able to read the specification." |
|
481 |
||
482 |
" |
|
483 |
self imageFor_false inspect |
|
484 |
ImageEditor openOnClass:self andSelector:#imageFor_false |
|
485 |
Icon flushCachedIcons |
|
486 |
" |
|
487 |
||
488 |
<resource: #image> |
|
489 |
||
490 |
^Icon |
|
11548 | 491 |
constantNamed:'InspectorView imageFor_false' |
11511 | 492 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
11548 | 493 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@ LC@ D@@@@@@@@@@@@DAPXFA0 IA@@@@@@@@@@JB0XLC@0L |
494 |
CP8J@@@@@@@@@ XOCA@PDA@QD @@@@@@@@LGC00PD1PNEQX@@@@@@@@CE1 LC@0MEQ$V@@@@@@@@@!!PTCA@PDAXZF0@@@@@@@@(QC 0PGA$]F!!8@@@@@@@@@ |
|
495 |
G10LDA(ZF"@@@@@@@@@@@@@JF1XVF18@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 200 120 145 208 64 109 208 16 96 208 96 128 208 0 87 248 0 103 248 0 88 240 0 85 200 0 68 200 120 146 208 0 72 250 255 248 184 192 189 160 0 52 248 8 100 135 144 128 144 0 60 128 16 63 208 8 83 184 0 77 128 0 53 88 0 37 216 0 75 224 0 78 96 0 25 64 0 27 120 16 59 120 0 50 64 0 12 160 72 102 208 96 143 136 32 60]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
11511 | 496 |
! |
497 |
||
498 |
imageFor_floats |
|
499 |
"This resource specification was automatically generated |
|
500 |
by the ImageEditor of ST/X." |
|
501 |
||
502 |
"Do not manually edit this!! If it is corrupted, |
|
503 |
the ImageEditor may not be able to read the specification." |
|
504 |
||
505 |
" |
|
506 |
self imageFor_floats inspect |
|
507 |
ImageEditor openOnClass:self andSelector:#imageFor_floats |
|
508 |
Icon flushCachedIcons |
|
509 |
" |
|
510 |
||
511 |
<resource: #image> |
|
512 |
||
513 |
^Icon |
|
514 |
constantNamed:'InspectorView class imageFor_floats' |
|
515 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
11517 | 516 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTEAOC-FQ@@@@@@@@@A@MT 2BS\; |
517 |
Q$U@@@@@@@@@LD!!HBP%HRTX>M@@@@@@@@D4<RC\IS#MFP4H@@@@@@@AMNS$9BSUCP3)B@@@@@@@@LCL3R0%EP4)GLP@@@@@@@D@>O $IBS8IQ2<@@@@@@@@@ |
|
11521
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
518 |
K$1LP$]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 0 231 4 0 132 0 0 156 5 139 142 128 52 255 49 0 181 6 161 255 140 0 222 4 33 255 37 0 74 0 0 99 5 0 107 0 0 148 5 0 189 0 0 90 3 8 255 12 16 255 24 0 173 6 206 173 99 156 131 74 206 165 66 115 82 16 255 181 16 189 132 0 132 99 16 206 149 0 198 181 123 255 181 49 255 189 33 222 156 0 99 75 0 239 173 0 255 181 0 255 181 140 148 107 0 140 115 49 198 173 123 255 173 0 90 66 0 132 91 0 206 182 99 156 115 0 198 141 0 74 50 0 255 189 16 214 148 0 90 57 0 189 140 0 107 74 0 206 148 16 214 156 8]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
11511 | 519 |
! |
520 |
||
521 |
imageFor_fractions |
|
522 |
"This resource specification was automatically generated |
|
523 |
by the ImageEditor of ST/X." |
|
524 |
||
525 |
"Do not manually edit this!! If it is corrupted, |
|
526 |
the ImageEditor may not be able to read the specification." |
|
527 |
||
528 |
" |
|
529 |
self imageFor_fractions inspect |
|
530 |
ImageEditor openOnClass:self andSelector:#imageFor_fractions |
|
531 |
Icon flushCachedIcons |
|
532 |
" |
|
533 |
||
534 |
<resource: #image> |
|
535 |
||
536 |
^Icon |
|
537 |
constantNamed:'InspectorView class imageFor_fractions' |
|
538 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
539 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTEABS-FQ@@@@@@@@@A@MSH2BP$7 |
|
11521
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
540 |
LTY@@@@@@@@@LCH2L#HIS#D1M@@@@@@@@D4<OC0<BSL1LTH@@@@@@@AML3L3BP$ILSEB@@@@@@@@LCL3L0$3BT\1LP@@@@@@@D@>L3L3BT]GQ2<@@@@@@@@@ |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
541 |
K$03BP$IQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 0 231 4 0 132 0 0 156 5 139 142 128 52 255 49 0 181 6 161 255 140 0 222 4 33 255 37 0 74 0 0 99 5 0 107 0 0 148 5 0 189 0 0 90 3 8 255 12 16 255 24 0 173 6 206 173 99 156 131 74 206 165 66 115 82 16 255 181 16 189 132 0 132 99 16 206 149 0 198 181 123 255 181 49 255 189 33 222 156 0 99 75 0 239 173 0 255 181 0 255 181 140 148 107 0 140 115 49 198 173 123 255 173 0 90 66 0 132 91 0 206 182 99 156 115 0 198 141 0 74 50 0 255 189 16 214 148 0 90 57 0 189 140 0 107 74 0 206 148 16 214 156 8]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
11511 | 542 |
! |
543 |
||
544 |
imageFor_integers |
|
545 |
"This resource specification was automatically generated |
|
546 |
by the ImageEditor of ST/X." |
|
547 |
||
548 |
"Do not manually edit this!! If it is corrupted, |
|
549 |
the ImageEditor may not be able to read the specification." |
|
550 |
||
551 |
" |
|
552 |
self imageFor_integers inspect |
|
553 |
ImageEditor openOnClass:self andSelector:#imageFor_integers |
|
554 |
Icon flushCachedIcons |
|
555 |
" |
|
556 |
||
557 |
<resource: #image> |
|
558 |
||
559 |
^Icon |
|
560 |
constantNamed:'InspectorView class imageFor_integers' |
|
561 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
11517 | 562 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTEAOC-FQ@@@@@@@@@A@MT 2BS\; |
563 |
Q$U@@@@@@@@@LD!!HBP%HRTX>M@@@@@@@@D4<RC\IS#MFP4H@@@@@@@AMNS$9BSUCP3)B@@@@@@@@LCL3R0%EP4)GLP@@@@@@@D@>O $IBS9JQ2<@@@@@@@@@ |
|
11521
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
564 |
K$1LP$]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 0 231 4 0 132 0 0 156 5 139 142 128 52 255 49 0 181 6 161 255 140 0 222 4 33 255 37 0 74 0 0 99 5 0 107 0 0 148 5 0 189 0 0 90 3 8 255 12 16 255 24 0 173 6 206 173 99 156 131 74 206 165 66 115 82 16 255 181 16 189 132 0 132 99 16 206 149 0 198 181 123 255 181 49 255 189 33 222 156 0 99 75 0 239 173 0 255 181 0 255 181 140 148 107 0 140 115 49 198 173 123 255 173 0 90 66 0 132 91 0 206 182 99 156 115 0 198 141 0 74 50 0 255 189 16 214 148 0 90 57 0 189 140 0 107 74 0 206 148 16 214 156 8]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
11511 | 565 |
! |
566 |
||
567 |
imageFor_nil |
|
568 |
"This resource specification was automatically generated |
|
569 |
by the ImageEditor of ST/X." |
|
570 |
||
571 |
"Do not manually edit this!! If it is corrupted, |
|
572 |
the ImageEditor may not be able to read the specification." |
|
573 |
||
574 |
" |
|
575 |
self imageFor_nil inspect |
|
576 |
ImageEditor openOnClass:self andSelector:#imageFor_nil |
|
577 |
Icon flushCachedIcons |
|
578 |
" |
|
579 |
||
580 |
<resource: #image> |
|
581 |
||
582 |
^Icon |
|
583 |
constantNamed:'InspectorView class imageFor_nil' |
|
584 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
585 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@KEP4MEP,@@@@@@@@@@@@GEA$YAP4OA0@@@@@@@@@JEA$WF!!HM |
|
586 |
C1 J@@@@@@@@EQ$R@@ CEAXDDP@@@@@@@@4ED!!(ACQXXC@X@@@@@@@@ME@4TEAXXCALF@@@@@@@@EQXVE HXC@XNF@@@@@@@@@(DF@PLCALNC!!@@@@@@@@@@ |
|
587 |
A1LSA 8NC 4@@@@@@@@@@@@JF@XFFA@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
588 |
! |
|
589 |
||
590 |
imageFor_others |
|
591 |
"This resource specification was automatically generated |
|
592 |
by the ImageEditor of ST/X." |
|
593 |
||
594 |
"Do not manually edit this!! If it is corrupted, |
|
595 |
the ImageEditor may not be able to read the specification." |
|
596 |
||
597 |
" |
|
598 |
self imageFor_others inspect |
|
599 |
ImageEditor openOnClass:self andSelector:#imageFor_others |
|
600 |
Icon flushCachedIcons |
|
601 |
" |
|
602 |
||
603 |
<resource: #image> |
|
604 |
||
605 |
^Icon |
|
606 |
constantNamed:'InspectorView class imageFor_others' |
|
607 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
608 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@_G1<_G1<@@@@@@@@@@@@_BP$IBP HF0@@@@@@@@@_BP$HH@ \ |
|
609 |
BA8[@@@@@@@@G0$HH ,BB$(F0@@@@@@@A<IJ0 $BB$HGQ,@@@@@@@@_BP #BBDHJRX[@@@@@@@@G0 )BB4HHQ<%F0@@@@@@@A<HBB4HKQ<''IQ,@@@@@@@@@ |
|
610 |
F2\''J"T%IQ,@@@@@@@@@@@@[F1,[F1,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
611 |
! |
|
612 |
||
11521
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
613 |
imageFor_sequenceableCollections |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
614 |
"This resource specification was automatically generated |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
615 |
by the ImageEditor of ST/X." |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
616 |
|
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
617 |
"Do not manually edit this!! If it is corrupted, |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
618 |
the ImageEditor may not be able to read the specification." |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
619 |
|
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
620 |
" |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
621 |
self imageFor_sequenceableCollections inspect |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
622 |
ImageEditor openOnClass:self andSelector:#imageFor_sequenceableCollections |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
623 |
Icon flushCachedIcons |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
624 |
" |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
625 |
|
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
626 |
<resource: #image> |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
627 |
|
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
628 |
^Icon |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
629 |
constantNamed:'InspectorView class imageFor_sequenceableCollections' |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
630 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
631 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@T5EQT4@@@@@@@@@@@@AOTUAPTEARS0@@@@@@@@AOTUAPTE@I |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
632 |
BEIO@@@@@@@@T5APTEAPTUIRO0@@@@@@@EEPTEAPT $HO3D@@@@@@@AQTUERT%IRO3D1@@@@@@@@T5IRT%IRBP!!JO0@@@@@@@D=RT%H?LSEJR"<@@@@@@@@@ |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
633 |
S3D1LT(IBB<@@@@@@@@@@@AOO3D1O2<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0 206 99 132 156 74 99 206 66 107 115 16 49 255 16 90 189 0 57 132 16 49 206 0 57 198 123 140 255 49 123 255 33 99 222 0 66 99 0 24 239 0 66 255 0 74 255 140 214 148 0 41 140 49 74 198 123 148 255 0 82 90 0 24 132 0 41 206 99 123 156 0 41 198 0 57 74 0 24 255 16 82 214 0 66 90 0 33 189 0 49 107 0 33 206 16 74 214 8 66 218 112 214 255 0 255 208 32 144 199 21 133 186 85 211]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
634 |
! |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
635 |
|
11511 | 636 |
imageFor_strings |
637 |
"This resource specification was automatically generated |
|
638 |
by the ImageEditor of ST/X." |
|
639 |
||
640 |
"Do not manually edit this!! If it is corrupted, |
|
641 |
the ImageEditor may not be able to read the specification." |
|
642 |
||
643 |
" |
|
644 |
self imageFor_strings inspect |
|
645 |
ImageEditor openOnClass:self andSelector:#imageFor_strings |
|
646 |
Icon flushCachedIcons |
|
647 |
" |
|
648 |
||
649 |
<resource: #image> |
|
650 |
||
651 |
^Icon |
|
652 |
constantNamed:'InspectorView class imageFor_strings' |
|
653 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
654 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTEAOC-FQ@@@@@@@@@A@MTDIM5LI |
|
655 |
BTU@@@@@@@@@LDDIM3]HBP$>M@@@@@@@@D4<BP$8S#LIP4H@@@@@@@AMNP$IMUDIP3)B@@@@@@@@LCL3R4=EP4)GLP@@@@@@@D@>QS9CTC)RQ2<@@@@@@@@@ |
|
656 |
K$1LP$]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0 206 99 132 156 74 99 206 66 107 115 16 49 255 16 90 189 0 57 132 16 49 206 0 57 198 123 140 255 49 123 255 33 99 222 0 66 99 0 24 239 0 66 255 0 74 255 140 214 148 0 41 140 49 74 198 123 148 255 0 82 90 0 24 132 0 41 206 99 123 156 0 41 198 0 57 74 0 24 255 16 82 214 0 66 90 0 33 189 0 49 107 0 33 206 16 74 214 8 66 173 0 49 115 0 33 181 0 49 74 0 16 255 8 82]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
657 |
! |
|
658 |
||
659 |
imageFor_symbols |
|
660 |
"This resource specification was automatically generated |
|
661 |
by the ImageEditor of ST/X." |
|
662 |
||
663 |
"Do not manually edit this!! If it is corrupted, |
|
664 |
the ImageEditor may not be able to read the specification." |
|
665 |
||
666 |
" |
|
667 |
self imageFor_symbols inspect |
|
668 |
ImageEditor openOnClass:self andSelector:#imageFor_symbols |
|
669 |
Icon flushCachedIcons |
|
670 |
" |
|
671 |
||
672 |
<resource: #image> |
|
673 |
||
674 |
^Icon |
|
675 |
constantNamed:'InspectorView class imageFor_symbols' |
|
676 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
677 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6LD5MLCX@@@@@@@@@@@ADRTEAOC-FQ@@@@@@@@@A@MTDIM5LI |
|
678 |
Q$U@@@@@@@@@LDDIBP$IBP$>M@@@@@@@@D4<NP$8S $>P4H@@@@@@@AMNS$IMUDIP3)B@@@@@@@@LCLIBP$IBP%GLP@@@@@@@D@>QP%CT@%RQ2<@@@@@@@@@ |
|
679 |
K$1LP$]GQ3<@@@@@@@@@@@A@LTIBLR<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 0 0 0 227 231 0 132 132 0 151 156 0 142 131 128 255 252 49 175 181 0 255 234 140 218 222 0 251 255 33 74 74 0 94 99 0 107 107 0 143 148 0 189 189 0 87 90 0 251 255 8 247 255 16 167 173 0 206 99 132 156 74 99 206 66 107 115 16 49 255 16 90 189 0 57 132 16 49 206 0 57 198 123 140 255 49 123 255 33 99 222 0 66 99 0 24 239 0 66 255 0 74 255 140 214 148 0 41 140 49 74 198 123 148 255 0 82 90 0 24 132 0 41 206 99 123 156 0 41 198 0 57 74 0 24 255 16 82 214 0 66 90 0 33 189 0 49 107 0 33 206 16 74 214 8 66 173 0 49 115 0 33 181 0 49 74 0 16 255 8 82]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
680 |
! |
|
681 |
||
682 |
imageFor_true |
|
683 |
"This resource specification was automatically generated |
|
684 |
by the ImageEditor of ST/X." |
|
685 |
||
686 |
"Do not manually edit this!! If it is corrupted, |
|
687 |
the ImageEditor may not be able to read the specification." |
|
688 |
||
689 |
" |
|
690 |
self imageFor_true inspect |
|
691 |
ImageEditor openOnClass:self andSelector:#imageFor_true |
|
692 |
Icon flushCachedIcons |
|
693 |
" |
|
694 |
||
695 |
<resource: #image> |
|
696 |
||
697 |
^Icon |
|
11548 | 698 |
constantNamed:'InspectorView imageFor_true' |
11511 | 699 |
ifAbsentPut:[(Depth8Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
700 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(MB@ MB @@@@@@@@@@@@:K#@0F2(\N @@@@@@@@@-H0$IBP$I |
|
11548 | 701 |
A18-@@@@@@@@MC@GI@$$IBP9HP@@@@@@@B@[J3DIIB0^K3 @@@@@@@@ MRT5BRP^K1<8@@@@@@@@MB0,I $$K2\"JP@@@@@@@B49G#$IIA<]H#H@@@@@@@@@ |
702 |
M#L3NBH"H#\@@@@@@@@@@@@-JS 8JSH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[226 226 226 176 176 176 155 155 155 169 169 169 152 152 152 164 164 164 149 149 149 192 192 192 240 240 240 255 255 255 202 202 202 201 201 201 151 151 151 162 162 162 148 148 148 158 158 158 173 173 173 154 154 154 167 167 167 150 150 150 160 160 160 180 180 180 156 156 156 170 170 170 153 153 153 165 165 165 183 183 183 98 255 0 75 198 0 25 74 0 57 156 0 34 99 0 92 206 16 60 132 16 31 74 0 79 206 0 128 131 142 88 231 0 70 189 0 38 90 0 148 198 123 57 115 16 92 239 0 103 255 8 76 189 0 154 198 123 85 214 0 53 132 0 106 255 0 138 255 49 107 156 74 44 115 0 119 206 66 85 222 0 142 206 99 68 139 33 33 90 0 57 148 0 135 206 99]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A>@O<A?8G? _>A?8G? _>@?0A>@@@@@@@@@b') ; yourself); yourself] |
|
11511 | 703 |
! ! |
704 |
||
2598 | 705 |
!InspectorView class methodsFor:'queries-plugin'! |
706 |
||
707 |
aspectSelectors |
|
708 |
^ #( inspectedObjectHolder ) |
|
709 |
||
710 |
"Modified: / 10.2.2000 / 12:25:28 / cg" |
|
711 |
! ! |
|
712 |
||
73 | 713 |
!InspectorView methodsFor:'accessing'! |
714 |
||
2007 | 715 |
allowFollow:aBoolean |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
716 |
"enable/disable the follow menu item; |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
717 |
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
|
718 |
|
2007 | 719 |
allowFollow := aBoolean |
720 |
! |
|
721 |
||
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
722 |
dereferenceValueHolders:aBoolean |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
723 |
dereferenceValueHolders := aBoolean |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
724 |
! |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
725 |
|
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
726 |
fieldListLabel:aString |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
727 |
labelView label:aString |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
728 |
|
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
729 |
"Created: 28.6.1996 / 15:30:26 / cg" |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
730 |
! |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
731 |
|
9630 | 732 |
headLineLabel:aString |
733 |
"an alternative headline label (if used as embedded inspector)" |
|
734 |
||
735 |
headLineLabel := aString. |
|
736 |
||
9648 | 737 |
labelView notNil ifTrue:[ |
738 |
labelView label:headLineLabel. |
|
739 |
]. |
|
740 |
||
741 |
"Modified: / 25-11-2010 / 17:16:45 / cg" |
|
9630 | 742 |
! |
743 |
||
9693 | 744 |
headLineLabelView |
745 |
"provides access to the headline" |
|
746 |
||
747 |
^ labelView |
|
748 |
||
749 |
"Created: / 21-01-2011 / 12:07:13 / cg" |
|
750 |
! |
|
751 |
||
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
752 |
hideReceiver:aBoolean |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
753 |
"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
|
754 |
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
|
755 |
|
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
756 |
hideReceiver := aBoolean |
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
757 |
|
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
758 |
"Created: 28.6.1996 / 15:08:32 / cg" |
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
759 |
! |
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
760 |
|
73 | 761 |
inspect:anObject |
8452 | 762 |
"set/update the object to be inspected" |
73 | 763 |
|
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
764 |
|keepList fieldNameList sameObject sameClass oldSelectedField idx| |
9390 | 765 |
|
9690 | 766 |
"/ (anObject isNil and:[object isNil]) ifTrue:[^ self]. |
9651 | 767 |
|
9390 | 768 |
sameObject := (anObject == object) and:[object notNil]. |
10520 | 769 |
|
770 |
"/ JV@2011-08-06: Be carefull here, classes may be variable-lenght, |
|
771 |
"/ so instances of same class may have different number of slots!! |
|
772 |
"/ (caused problems expecially when stack inspector is shown in debugger). |
|
773 |
"/ To fix, I've added ------------------------v |
|
774 |
sameClass := (anObject class == object class) and:[anObject class isVariable not]. |
|
9390 | 775 |
selectionIndex notNil ifTrue:[ |
776 |
oldSelectedField := (listView list ? #()) at:selectionIndex ifAbsent:nil. |
|
777 |
]. |
|
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
778 |
inspectedObject := object := anObject. |
73 | 779 |
|
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
780 |
keepList := ((sameObject | sameClass) and:[listView list notEmptyOrNil]). |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
781 |
"/ assume that the list remains unchanged; |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
782 |
"/ this is no longer true, if some inst-slot has changed (bullet colors) |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
783 |
UserPreferences current showTypeIndicatorInInspector ifTrue:[ |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
784 |
keepList := false. |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
785 |
]. |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
786 |
keepList ifFalse:[ |
2007 | 787 |
hasMore := false. |
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
788 |
fieldNameList := self fieldList. |
2007 | 789 |
hasMore ifTrue:[ |
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
790 |
fieldNameList add:' ... ' |
2007 | 791 |
]. |
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
792 |
listView contents:fieldNameList. |
2007 | 793 |
workspace contents:nil. |
794 |
self setDoItAction. |
|
73 | 795 |
]. |
9390 | 796 |
sameClass ifFalse:[ |
797 |
selectionIndex := selectedLine := nil. |
|
798 |
]. |
|
9262 | 799 |
isStandaloneInspector ifTrue:[ |
8452 | 800 |
"/ not embedded (as in the debugger) |
2284 | 801 |
self topView |
802 |
label:(self labelFor:anObject); |
|
10321 | 803 |
iconLabel:(self class labelNameFor:anObject). |
8452 | 804 |
]. |
805 |
||
9390 | 806 |
(sameObject | sameClass) ifFalse:[ |
807 |
idx := (listView list ? #()) indexOf:oldSelectedField. |
|
808 |
idx ~~ 0 ifTrue:[ |
|
809 |
listView selection:idx |
|
810 |
] ifFalse:[ |
|
811 |
self setInitialSelection. |
|
812 |
] |
|
8452 | 813 |
]. |
10520 | 814 |
self showSelection:((selectedLine ? 1) min: listView list size) |
9624 | 815 |
|
10520 | 816 |
"Modified (comment): / 06-08-2011 / 13:41:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
817 |
"Modified: / 02-06-2012 / 13:06:59 / cg" |
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
818 |
! |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
819 |
|
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
820 |
isStandaloneInspector:aBoolean |
2007 | 821 |
"obsolete now" |
822 |
||
2008
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
823 |
isStandaloneInspector := aBoolean |
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
824 |
|
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
825 |
"Modified: / 12.2.1999 / 16:01:44 / cg" |
29 | 826 |
! |
827 |
||
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
828 |
label:aString |
4106 | 829 |
"set the fieldListLabel - obsolete; collides with inherited label-functionality" |
830 |
||
5845 | 831 |
<resource:#obsolete> |
4106 | 832 |
self obsoleteMethodWarning:'use fieldListLabel:'. |
833 |
self fieldListLabel:aString. |
|
834 |
super label:aString. |
|
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
835 |
|
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
836 |
"Created: 28.6.1996 / 15:30:26 / cg" |
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
837 |
! |
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
838 |
|
73 | 839 |
listView |
840 |
^ listView |
|
352 | 841 |
! |
842 |
||
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
843 |
reinspect |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
844 |
"update display for a changed inspectedObject" |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
845 |
|
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
846 |
|aList| |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
847 |
|
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
848 |
hasMore := false. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
849 |
aList := self fieldList. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
850 |
hasMore ifTrue:[ |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
851 |
aList add:' ... ' |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
852 |
]. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
853 |
|
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
854 |
listView contents:aList. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
855 |
self setDoItAction. |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
856 |
selectionIndex := selectedLine := nil |
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
857 |
|
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
858 |
"Modified (comment): / 02-06-2012 / 13:08:15 / cg" |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
859 |
! |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
860 |
|
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
861 |
suppressHeadline:aBoolean |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
862 |
"hide/show the title line above the list/value" |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
863 |
|
9736 | 864 |
suppressHeadline := aBoolean. |
865 |
||
866 |
labelView notNil ifTrue:[ |
|
867 |
suppressHeadline == true ifTrue:[ |
|
868 |
labelView beInvisible. |
|
869 |
listView container topInset:0. |
|
870 |
workspace container topInset:0. |
|
871 |
] ifFalse:[ |
|
872 |
labelView beVisible. |
|
873 |
listView container topInset:(labelView preferredHeight). |
|
874 |
workspace container topInset:(labelView preferredHeight). |
|
875 |
]. |
|
876 |
]. |
|
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
877 |
|
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
878 |
"Created: / 09-11-2010 / 14:50:04 / cg" |
9736 | 879 |
"Modified: / 05-02-2011 / 14:03:55 / cg" |
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
880 |
! |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
881 |
|
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
882 |
suppressPseudoSlots:aBoolean |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
883 |
suppressPseudoSlots := aBoolean |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
884 |
! |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
885 |
|
352 | 886 |
workspace |
887 |
^ workspace |
|
52 | 888 |
! ! |
889 |
||
2724 | 890 |
!InspectorView methodsFor:'accessing-channels'! |
2598 | 891 |
|
892 |
inspectedObjectHolder |
|
893 |
inspectedObjectHolder isNil ifTrue:[ |
|
894 |
inspectedObjectHolder := ValueHolder new. |
|
895 |
inspectedObjectHolder addDependent:self. |
|
896 |
]. |
|
897 |
^ inspectedObjectHolder |
|
898 |
||
899 |
"Created: / 10.2.2000 / 13:33:16 / cg" |
|
900 |
"Modified: / 10.2.2000 / 13:34:23 / cg" |
|
901 |
! |
|
902 |
||
903 |
inspectedObjectHolder:aValueHolder |
|
904 |
inspectedObjectHolder notNil ifTrue:[ |
|
905 |
inspectedObjectHolder removeDependent:self. |
|
906 |
]. |
|
907 |
inspectedObjectHolder := aValueHolder. |
|
908 |
inspectedObjectHolder notNil ifTrue:[ |
|
909 |
inspectedObjectHolder addDependent:self. |
|
910 |
]. |
|
911 |
||
912 |
"Created: / 10.2.2000 / 13:34:53 / cg" |
|
913 |
! ! |
|
914 |
||
915 |
!InspectorView methodsFor:'change & update'! |
|
916 |
||
917 |
update:something with:aParameter from:changedObject |
|
918 |
"Invoked when one of my dependees sends a change notification." |
|
919 |
||
920 |
|oldSelection| |
|
921 |
||
9367 | 922 |
changedObject == object ifTrue:[ |
2598 | 923 |
oldSelection := listView selection. |
9367 | 924 |
self inspect:object. |
2598 | 925 |
oldSelection notNil ifTrue:[ |
926 |
self showSelection:oldSelection |
|
927 |
] |
|
928 |
]. |
|
929 |
||
9367 | 930 |
changedObject == object ifTrue:[ |
931 |
self inspect:(object value) |
|
2598 | 932 |
]. |
933 |
||
934 |
super update:something with:aParameter from:changedObject |
|
935 |
||
936 |
"Created: / 10.2.2000 / 13:46:38 / cg" |
|
937 |
"Modified: / 10.2.2000 / 13:48:18 / cg" |
|
938 |
! ! |
|
939 |
||
7297 | 940 |
!InspectorView methodsFor:'drag & drop'! |
941 |
||
942 |
getDisplayObjects |
|
943 |
||
944 |
^List with:self selection printString |
|
945 |
||
946 |
"Created: / 16-08-2005 / 21:54:52 / janfrog" |
|
947 |
"Modified: / 18-09-2006 / 21:11:16 / cg" |
|
948 |
! |
|
949 |
||
950 |
getDropObjects |
|
951 |
||
952 |
^List with:(DropObject new:self selection). |
|
953 |
||
954 |
"Created: / 16-08-2005 / 21:49:23 / janfrog" |
|
955 |
"Modified: / 18-09-2006 / 21:11:31 / cg" |
|
956 |
! ! |
|
957 |
||
8025 | 958 |
!InspectorView methodsFor:'event handling'! |
959 |
||
10424
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
960 |
doubleClickOnLine:lineNr |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
961 |
|objectToInspect app| |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
962 |
|
11702 | 963 |
objectToInspect := self selectedField. |
10424
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
964 |
|
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
965 |
"HACK" |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
966 |
app := (self topView perform:#application ifNotUnderstood: [nil]). |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
967 |
(app notNil and:[app isKindOf: Tools::Inspector2]) ifTrue:[ |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
968 |
app inspect: objectToInspect |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
969 |
] ifFalse:[ |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
970 |
objectToInspect inspect |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
971 |
] |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
972 |
|
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
973 |
"Created: / 29-07-2011 / 21:09:43 / cg" |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
974 |
! |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
975 |
|
8025 | 976 |
keyPress:key x:x y:y |
977 |
"handle special keys" |
|
978 |
||
979 |
<resource: #keyboard (#BrowseIt #InspectIt)> |
|
980 |
||
981 |
self selection notNil ifTrue:[ |
|
982 |
(key == #BrowseIt) ifTrue:[ |
|
983 |
self browse. |
|
984 |
^ self. |
|
985 |
]. |
|
986 |
(key == #InspectIt) ifTrue:[ |
|
987 |
self doInspect. |
|
988 |
^ self. |
|
989 |
]. |
|
990 |
]. |
|
991 |
||
992 |
"all my other input is passed on to the workspace-field" |
|
993 |
x notNil ifTrue:[ |
|
994 |
"/ not already delegated |
|
995 |
workspace keyPress:key x:-1 y:-1 |
|
996 |
]. |
|
9389 | 997 |
! |
998 |
||
11702 | 999 |
selectedField |
1000 |
^ self theSingleSelectionIndex isNil |
|
1001 |
ifTrue:[object] |
|
1002 |
ifFalse:[self selection]. |
|
1003 |
||
1004 |
"Created: / 27-07-2012 / 22:42:23 / cg" |
|
1005 |
! |
|
1006 |
||
9389 | 1007 |
sizeChanged:how |
1008 |
super sizeChanged:how. |
|
1009 |
||
1010 |
isStandaloneInspector == true ifTrue:[ |
|
1011 |
LastExtent := self topView extent. |
|
1012 |
]. |
|
8025 | 1013 |
! ! |
1014 |
||
2587
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1015 |
!InspectorView methodsFor:'initialization & release'! |
2117 | 1016 |
|
1017 |
destroy |
|
7867 | 1018 |
(self topView objectAttributeAt:#rememberExtent) == true ifTrue:[ |
1019 |
self class rememberLastExtent:(self topView extent). |
|
1020 |
]. |
|
1021 |
||
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1022 |
inspectedObject := object := nil. |
2117 | 1023 |
monitorProcess notNil ifTrue:[ |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1024 |
monitorProcess terminate |
2117 | 1025 |
]. |
1026 |
super destroy |
|
7867 | 1027 |
|
1028 |
"Modified: / 23-10-2007 / 19:11:04 / cg" |
|
2117 | 1029 |
! |
73 | 1030 |
|
1031 |
initialize |
|
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1032 |
|v panel helpView labelView2| |
73 | 1033 |
|
1034 |
super initialize. |
|
1035 |
||
3318
46c3347385f4
preps to allow for displayString message to be configured
Claus Gittinger <cg@exept.de>
parents:
3199
diff
changeset
|
1036 |
displayStringMessage := #displayString. |
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1037 |
hideReceiver := false. |
10846 | 1038 |
integerDisplayRadix := (DefaultIntegerDisplayRadix ? 10). |
11629 | 1039 |
sortOrder := #instvarOrder. |
2007 | 1040 |
allowFollow := false. |
2008
52bf8b8afd3b
separated allowFollow from isStandAlone flag
Claus Gittinger <cg@exept.de>
parents:
2007
diff
changeset
|
1041 |
isStandaloneInspector := false. |
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1042 |
|
73 | 1043 |
panel := VariableHorizontalPanel |
1991
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1044 |
origin:(0.0 @ 0.0) |
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1045 |
corner:(1.0 @ 1.0) |
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1046 |
in:self. |
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1047 |
|
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1048 |
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
|
1049 |
helpView level:0; borderWidth:0. |
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1050 |
|
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1051 |
suppressHeadline == true ifFalse:[ |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1052 |
labelView := Label origin:0.0@0.0 corner:1.0@0.0 in:helpView. |
9630 | 1053 |
labelView label:(headLineLabel ? self defaultLabel). |
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1054 |
labelView bottomInset:(labelView preferredHeight negated). |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1055 |
]. |
73 | 1056 |
|
1057 |
v := HVScrollableView |
|
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1058 |
for:SelectionInListView |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1059 |
miniScrollerH:true |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1060 |
miniScrollerV:false |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1061 |
in:helpView. |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1062 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1063 |
labelView notNil ifTrue:[ |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1064 |
v topInset:(labelView preferredHeight). |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1065 |
]. |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1066 |
|
1991
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1067 |
"/ v autoHideScrollBars:true. |
73 | 1068 |
|
1069 |
listView := v scrolledView. |
|
8653 | 1070 |
listView action:[:lineNr | self selection:lineNr.]. |
10424
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
1071 |
listView doubleClickAction:[:lineNr | self doubleClickOnLine:lineNr]. |
73 | 1072 |
listView ignoreReselect:false. |
98 | 1073 |
listView menuHolder:self; menuPerformer:self; menuMessage:#fieldMenu. |
7297 | 1074 |
self initializeDragAndDrop. |
73 | 1075 |
|
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1076 |
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
|
1077 |
helpView level:0; borderWidth:0. |
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1078 |
|
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1079 |
suppressHeadline == true ifFalse:[ |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1080 |
labelView2 := Label origin:0.0@0.0 corner:1.0@0.0 in:helpView. |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1081 |
labelView2 label:''. |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1082 |
labelView2 bottomInset:(labelView preferredHeight negated). |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1083 |
]. |
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1084 |
|
73 | 1085 |
v := HVScrollableView |
1991
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1086 |
for:CodeView |
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1087 |
miniScrollerH:true |
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1088 |
miniScrollerV:false |
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1089 |
in:helpView. |
dfbb30988edd
no miniScrollers; no autoHide
Claus Gittinger <cg@exept.de>
parents:
1930
diff
changeset
|
1090 |
"/ v autoHideScrollBars:true. |
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1091 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
9625
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1092 |
labelView2 notNil ifTrue:[ |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1093 |
v topInset:(labelView2 preferredHeight). |
1b6c049c1990
allow suppressing the headline
Claus Gittinger <cg@exept.de>
parents:
9624
diff
changeset
|
1094 |
]. |
73 | 1095 |
workspace := v scrolledView. |
1096 |
||
3608 | 1097 |
self setAcceptAction. |
73 | 1098 |
|
1099 |
nShown := 100. |
|
1100 |
hasMore := false. |
|
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
1101 |
|
7297 | 1102 |
"Modified: / 16-08-2005 / 21:54:04 / janfrog" |
11629 | 1103 |
"Modified: / 20-07-2012 / 10:48:34 / cg" |
7297 | 1104 |
! |
1105 |
||
1106 |
initializeDragAndDrop |
|
1107 |
||
1108 |
| source | |
|
1109 |
source := DropSource |
|
1110 |
receiver:self |
|
1111 |
argument:nil |
|
1112 |
dropObjectSelector:#getDropObjects |
|
1113 |
displayObjectSelector:#getDisplayObjects |
|
1114 |
dropFeedBackSelector:nil. |
|
1115 |
||
1116 |
listView dropSource:source. |
|
1117 |
||
1118 |
"Created: / 16-08-2005 / 21:51:43 / janfrog" |
|
1119 |
"Modified: / 18-09-2006 / 21:13:05 / cg" |
|
200 | 1120 |
! |
1121 |
||
593 | 1122 |
realize |
1123 |
"delayed setup of lists till first map-time - |
|
200 | 1124 |
this makes startup of inspectors a bit faster" |
1125 |
||
1126 |
|o| |
|
1127 |
||
593 | 1128 |
super realize. |
7887
be186ae12782
dont clobber the current selection on realize
Claus Gittinger <cg@exept.de>
parents:
7867
diff
changeset
|
1129 |
"/ cg: I dont remember what this was needed for (is it still?) |
9367 | 1130 |
false "object notNil" ifTrue:[ |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1131 |
" |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1132 |
kludge to trick inspect:, which ignores setting the |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1133 |
same object again ... |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1134 |
" |
9367 | 1135 |
o := object. |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1136 |
inspectedObject := object := nil. |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1137 |
self inspect:o |
383 | 1138 |
] |
593 | 1139 |
|
7887
be186ae12782
dont clobber the current selection on realize
Claus Gittinger <cg@exept.de>
parents:
7867
diff
changeset
|
1140 |
"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
|
1141 |
"Modified: / 05-11-2007 / 20:11:44 / cg" |
2117 | 1142 |
! |
1143 |
||
1144 |
release |
|
1145 |
"release inpected object. This is normally not needed, |
|
1146 |
since the garbage collector will find this memory alone. |
|
1147 |
However, if some applications keeps invisible inspectors around |
|
1148 |
(for example, the debugger does this), the inspected object |
|
1149 |
would be kept from being freed or freed very late." |
|
1150 |
||
1151 |
" |
|
1152 |
inspectedObject notNil ifTrue:[ |
|
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1153 |
inspectedObject removeDependent:self |
2117 | 1154 |
]. |
1155 |
" |
|
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1156 |
inspectedObject := object := nil. |
2117 | 1157 |
self setDoItAction. "/ to release ref to inspectedObject in doItBlock |
1158 |
workspace contents:nil. |
|
1159 |
listView contents:nil. |
|
1160 |
||
1161 |
super release. |
|
1162 |
||
1163 |
"Modified: 11.6.1997 / 13:20:39 / cg" |
|
8452 | 1164 |
! |
1165 |
||
1166 |
setInitialSelection |
|
8868
1fd94adeda59
changed: #setInitialSelection
Claus Gittinger <cg@exept.de>
parents:
8800
diff
changeset
|
1167 |
object isLazyValue ifFalse:[ |
1fd94adeda59
changed: #setInitialSelection
Claus Gittinger <cg@exept.de>
parents:
8800
diff
changeset
|
1168 |
object isString ifTrue:[ |
1fd94adeda59
changed: #setInitialSelection
Claus Gittinger <cg@exept.de>
parents:
8800
diff
changeset
|
1169 |
self showSelection:1 "/ the self-line |
1fd94adeda59
changed: #setInitialSelection
Claus Gittinger <cg@exept.de>
parents:
8800
diff
changeset
|
1170 |
] |
8452 | 1171 |
]. |
98 | 1172 |
! ! |
1173 |
||
1174 |
!InspectorView methodsFor:'menu'! |
|
73 | 1175 |
|
1176 |
fieldMenu |
|
1040 | 1177 |
"return the menu for the field-list" |
1178 |
||
1235
13610578a5d2
resource flag: #menu -> #programMenu
Claus Gittinger <cg@exept.de>
parents:
1185
diff
changeset
|
1179 |
<resource: #programMenu> |
1040 | 1180 |
|
9703 | 1181 |
|items m sel protocolMenu localProtocolMenu |
1182 |
protocols protocolsSorted |
|
1183 |
selectorsByFirstCharacter alphaMenu |
|
1184 |
localSelectors| |
|
1597
48629e1fc7b6
use new menu-creation message in PopUpMenu.
Claus Gittinger <cg@exept.de>
parents:
1570
diff
changeset
|
1185 |
|
48629e1fc7b6
use new menu-creation message in PopUpMenu.
Claus Gittinger <cg@exept.de>
parents:
1570
diff
changeset
|
1186 |
items := #( |
3198 | 1187 |
('Copy Name or Key' #doCopyKey ) |
2085 | 1188 |
('-') |
3198 | 1189 |
('Inspect' #doInspect ) |
1190 |
('BasicInspect' #doBasicInspect ) |
|
9349
e6d367cbe86c
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
9316
diff
changeset
|
1191 |
). |
e6d367cbe86c
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
9316
diff
changeset
|
1192 |
NewInspector::NewInspectorView notNil ifTrue:[ |
e6d367cbe86c
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
9316
diff
changeset
|
1193 |
items := items , #( |
4197 | 1194 |
('Inspect Hierarchical' #doNewInspect ) |
9349
e6d367cbe86c
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
9316
diff
changeset
|
1195 |
). |
e6d367cbe86c
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
9316
diff
changeset
|
1196 |
]. |
e6d367cbe86c
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
9316
diff
changeset
|
1197 |
items := items , #( |
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1198 |
('Browse' #browse ) |
8800 | 1199 |
). |
9703 | 1200 |
items := items , (self optionalToolItems). |
8800 | 1201 |
items := items , (self optionalViewSelectionItems). |
1202 |
items := items , #( |
|
7951 | 1203 |
('-') |
1204 |
('Owners' #showOwners ) |
|
4197 | 1205 |
('Ref Chains' #showReferences ) |
3199 | 1206 |
"/ ('Browse class hierarchy' #browseClassHierarchy ) |
1207 |
"/ ('Browse full class protocol' #browseFullClassProtocol) |
|
2579 | 1208 |
). |
2587
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1209 |
|
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1210 |
sel := self selection. |
6491 | 1211 |
|
8799 | 1212 |
items := items , (self optionalMethodOrBlockSelectionItems). |
7639 | 1213 |
items := items , (self optionalStreamSelectionItems). |
1214 |
items := items , (self optionalFilenameSelectionItems). |
|
9700 | 1215 |
items := items , (self optionalByteArraySelectionItems). |
7639 | 1216 |
|
2579 | 1217 |
items := items , #( |
2085 | 1218 |
('-') |
9574 | 1219 |
('Local Protocol' #localProtocolMenu ) |
1220 |
('Full Protocol' #protocolMenu ) |
|
1221 |
('-') |
|
4197 | 1222 |
('Trap Message...' #doTrap ) |
1223 |
('Trap all Messages' #doTrapAll ) |
|
1224 |
('Trace all Messages' #doTraceAll ) |
|
1225 |
('Untrace/Untrap' #doUntrace ) |
|
2850 | 1226 |
"/ ('-') |
3198 | 1227 |
"/ ('Trap change to instVar' #doTrapInstVarChange ) |
1228 |
"/ ('Trap change to any instVar' #doTrapAnyInstVarChange ) |
|
2007 | 1229 |
). |
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1230 |
|
2007 | 1231 |
allowFollow ifTrue:[ |
1232 |
items := #( |
|
3198 | 1233 |
('Follow' #doFollow ) |
1234 |
('Back' #doBack ) |
|
2007 | 1235 |
('-') |
1236 |
) |
|
1237 |
, |
|
1238 |
items. |
|
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1239 |
]. |
73 | 1240 |
|
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1241 |
monitorProcess isNil ifTrue:[ |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1242 |
items := items , #( |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1243 |
('Start Monitor' #doStartMonitor ) |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1244 |
). |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1245 |
] ifFalse:[ |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1246 |
items := items , #( |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1247 |
('Stop Monitor' #doStopMonitor ) |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1248 |
). |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1249 |
]. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1250 |
|
73 | 1251 |
hasMore ifTrue:[ |
2007 | 1252 |
items := items , #( |
1253 |
('-') |
|
4197 | 1254 |
('Show More' #showMore ) |
11576 | 1255 |
). |
11578 | 1256 |
(self numIndexedFields > (nShown * 2)) ifTrue:[ |
11576 | 1257 |
items := items , #( |
1258 |
('Show All' #showAll ) |
|
2007 | 1259 |
) |
11576 | 1260 |
]. |
73 | 1261 |
]. |
1262 |
||
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1263 |
protocols := Dictionary new. |
9703 | 1264 |
selectorsByFirstCharacter := Dictionary new. |
9367 | 1265 |
object class withAllSuperclassesDo:[:eachClass | |
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1266 |
eachClass methodDictionary keysAndValuesDo:[:sel :m | |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1267 |
sel numArgs == 0 ifTrue:[ |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1268 |
(protocols at:m category ifAbsentPut:[Set new]) add:sel. |
9703 | 1269 |
(selectorsByFirstCharacter at:(sel first asString) ifAbsentPut:[Set new]) add:sel. |
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1270 |
] |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1271 |
]. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1272 |
]. |
9574 | 1273 |
|
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1274 |
protocolsSorted := protocols keys asArray sort. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1275 |
protocolMenu := PopUpMenu |
9703 | 1276 |
labels:#('alphabetical' '=') , protocolsSorted |
1277 |
selectors:#(nil nil) , protocolsSorted. |
|
1278 |
||
1279 |
protocolMenu |
|
1280 |
subMenuAt:'alphabetical' |
|
1281 |
put:[ |
|
1282 |
|firstChars| |
|
1283 |
||
1284 |
firstChars := selectorsByFirstCharacter keys asOrderedCollection sort. |
|
1285 |
alphaMenu := PopUpMenu |
|
1286 |
labels:firstChars |
|
1287 |
selector:#mmm |
|
1288 |
args:firstChars |
|
1289 |
receiver:self. |
|
1290 |
firstChars do:[:ch | |
|
1291 |
alphaMenu |
|
1292 |
subMenuAt:ch |
|
1293 |
put:[ |
|
1294 |
|selectors sortedSelectors| |
|
1295 |
||
1296 |
selectors := selectorsByFirstCharacter at:ch. |
|
1297 |
sortedSelectors := selectors asArray sort. |
|
1298 |
protocolMenu := PopUpMenu |
|
1299 |
labels:sortedSelectors |
|
1300 |
selector:#letSelectedObjectPerform: |
|
1301 |
args:sortedSelectors |
|
1302 |
receiver:self. |
|
1303 |
] |
|
1304 |
]. |
|
1305 |
alphaMenu |
|
1306 |
]. |
|
1307 |
||
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1308 |
protocolsSorted do:[:p | |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1309 |
protocolMenu |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1310 |
subMenuAt:p |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1311 |
put:[ |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1312 |
|selectors sortedSelectors| |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1313 |
|
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1314 |
selectors := protocols at:p. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1315 |
sortedSelectors := selectors asArray sort. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1316 |
protocolMenu := PopUpMenu |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1317 |
labels:sortedSelectors |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1318 |
selector:#letSelectedObjectPerform: |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1319 |
args:sortedSelectors |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1320 |
receiver:self. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1321 |
] |
93 | 1322 |
]. |
1323 |
||
9574 | 1324 |
localSelectors := object class methodDictionary keys asArray sort. |
1325 |
localProtocolMenu := PopUpMenu |
|
1326 |
labels:localSelectors |
|
1327 |
selector:#letSelectedObjectPerform: |
|
1328 |
args:localSelectors |
|
1329 |
receiver:self. |
|
1330 |
||
11629 | 1331 |
items := items , (self sortOrderItems). |
7639 | 1332 |
items := items , (self numberBaseItems). |
1634
216a4254e634
added 'hex integers' toggle to menu.
Claus Gittinger <cg@exept.de>
parents:
1597
diff
changeset
|
1333 |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1334 |
m := PopUpMenu |
2007 | 1335 |
itemList:items |
1336 |
resources:resources. |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1337 |
|
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1338 |
m subMenuAt:#protocolMenu put:protocolMenu. |
9574 | 1339 |
m subMenuAt:#localProtocolMenu put:localProtocolMenu. |
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1340 |
|
9703 | 1341 |
(self theSingleSelectionIndex isNil) ifTrue:[ |
2007 | 1342 |
m disableAll:#(doFollow doInspect doBasicInspect doNewInspect |
1343 |
browse browseClassHierarchy browseFullClassProtocol |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
1344 |
doStartMonitor doCopyKey doCopyKey) |
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1345 |
]. |
9703 | 1346 |
(self hasSelfEntry and:[selectionIndex == 1]) ifTrue:[ |
1347 |
m disableAll:#(doFollow doCopyKey "doInspect doBasicInspect") |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1348 |
]. |
7975 | 1349 |
|
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1350 |
inspectHistory size == 0 ifTrue:[ |
2007 | 1351 |
m disable:#doBack |
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1352 |
]. |
6491 | 1353 |
sel class hasImmediateInstances ifTrue:[ |
2580 | 1354 |
m disableAll:#(showReferences doNewInspect) |
1355 |
]. |
|
8616 | 1356 |
"/ sel inspectorClass == self class ifFalse:[ |
1357 |
"/ m disable:#doFollow |
|
1358 |
"/ ]. |
|
4197 | 1359 |
sel isMethod ifFalse:[ |
1360 |
m disable:#browseMethodsClass |
|
1361 |
]. |
|
3199 | 1362 |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1363 |
^ m |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1364 |
|
11629 | 1365 |
"Modified: / 20-07-2012 / 10:50:45 / cg" |
7639 | 1366 |
! |
1367 |
||
1368 |
numberBaseItems |
|
9557
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1369 |
^ { |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1370 |
#('-') . |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1371 |
(integerDisplayRadix == 10) |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1372 |
ifFalse:[ #('Decimal Integers' #setDisplayRadixTo10 ) ] . |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1373 |
(integerDisplayRadix == 2) |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1374 |
ifFalse:[ #('Binary Integers' #setDisplayRadixTo2 ) ] . |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1375 |
(integerDisplayRadix == 16) |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1376 |
ifFalse:[ #('Hex Integers' #setDisplayRadixTo16 ) ] . |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1377 |
} select:[:el | el notNil]. |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1378 |
|
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
1379 |
"Modified: / 24-08-2010 / 17:31:51 / cg" |
7639 | 1380 |
! |
1381 |
||
9700 | 1382 |
optionalByteArraySelectionItems |
1383 |
|sel| |
|
1384 |
||
1385 |
sel := self selection. |
|
1386 |
(object isByteArray) ifTrue:[ |
|
1387 |
^ #( |
|
1388 |
('Save Bytes to File...' #saveBytesToFile) |
|
1389 |
). |
|
1390 |
]. |
|
1391 |
^ #() |
|
1392 |
||
1393 |
"Created: / 25-01-2011 / 17:16:12 / cg" |
|
1394 |
! |
|
1395 |
||
7639 | 1396 |
optionalFilenameSelectionItems |
1397 |
|sel| |
|
1398 |
||
1399 |
sel := self selection. |
|
9367 | 1400 |
(object isFilename or:[sel isFilename]) ifTrue:[ |
9737 | 1401 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
1402 |
^ #( |
|
1403 |
('Show in Explorer' #showInWindowsExplorer) |
|
1404 |
('Open FileBrowser' #openFileBrowser) |
|
1405 |
). |
|
1406 |
]. |
|
7639 | 1407 |
^ #( |
8090 | 1408 |
('Open FileBrowser' #openFileBrowser) |
1409 |
). |
|
7639 | 1410 |
]. |
1411 |
^ #() |
|
1412 |
||
1413 |
"Created: / 09-02-2007 / 16:10:30 / cg" |
|
9737 | 1414 |
"Modified: / 05-02-2011 / 15:49:48 / cg" |
7639 | 1415 |
! |
1416 |
||
8799 | 1417 |
optionalMethodOrBlockSelectionItems |
1418 |
|sel items| |
|
1419 |
||
1420 |
sel := self selection. |
|
1421 |
||
1422 |
items := #(). |
|
1423 |
(sel isBlock or:[sel isContext]) ifTrue:[ |
|
1424 |
items := items , #( |
|
10436 | 1425 |
('Browse Block''s Home' #browseHome) |
8799 | 1426 |
). |
1427 |
]. |
|
9367 | 1428 |
(object isMethod or:[sel isMethod]) ifTrue:[ |
8799 | 1429 |
items := items , #( |
10436 | 1430 |
('Browse Method''s Class' #browseMethodsClass) |
8799 | 1431 |
). |
1432 |
]. |
|
1433 |
(selectionIndex notNil |
|
1434 |
and:[(self fieldList at:selectionIndex ifAbsent:nil) = '-dependents']) ifTrue:[ |
|
1435 |
items := items , #( |
|
1436 |
('Browse Update Methods' #browseUpdateMethods) |
|
1437 |
). |
|
1438 |
]. |
|
1439 |
||
1440 |
^ items |
|
10436 | 1441 |
|
1442 |
"Modified: / 03-08-2011 / 15:03:36 / cg" |
|
8799 | 1443 |
! |
1444 |
||
7639 | 1445 |
optionalStreamSelectionItems |
1446 |
|sel| |
|
1447 |
||
1448 |
sel := self selection. |
|
1449 |
||
8090 | 1450 |
sel isStream ifTrue:[ |
1451 |
sel isFileStream ifTrue:[ |
|
9737 | 1452 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
1453 |
^ #( |
|
1454 |
('Show in Explorer' #showInWindowsExplorer) |
|
1455 |
('Open FileBrowser' #openFileBrowser) |
|
1456 |
). |
|
1457 |
]. |
|
8090 | 1458 |
^ #( |
1459 |
('Open FileBrowser' #openFileBrowser) |
|
1460 |
). |
|
1461 |
]. |
|
9384 | 1462 |
sel isExternalStream ifFalse:[ |
8090 | 1463 |
^ #( |
7639 | 1464 |
('Show Stream Contents' #showStreamContents) |
1465 |
). |
|
8090 | 1466 |
]. |
7639 | 1467 |
]. |
1468 |
^ #() |
|
1469 |
||
1470 |
"Created: / 09-02-2007 / 16:09:15 / cg" |
|
9737 | 1471 |
"Modified: / 05-02-2011 / 15:49:55 / cg" |
8799 | 1472 |
! |
1473 |
||
9703 | 1474 |
optionalToolItems |
1475 |
"inserted after inspect/browse" |
|
1476 |
||
1477 |
^ #() |
|
1478 |
||
1479 |
"Created: / 27-01-2011 / 11:51:12 / cg" |
|
1480 |
! |
|
1481 |
||
8799 | 1482 |
optionalViewSelectionItems |
1483 |
|sel| |
|
1484 |
||
1485 |
sel := self selection. |
|
1486 |
||
1487 |
sel isView ifTrue:[ |
|
1488 |
^ #( |
|
1489 |
('Show Widget Hierarchy' #openWidgetHierarchy) |
|
1490 |
). |
|
1491 |
]. |
|
1492 |
^ #() |
|
11629 | 1493 |
! |
1494 |
||
1495 |
sortOrderItems |
|
11634 | 1496 |
object class instSize == 0 ifTrue:[ ^ #() ]. |
11629 | 1497 |
^ { |
1498 |
#('-') . |
|
1499 |
(sortOrder == #instvarOrder) |
|
1500 |
ifFalse:[ #('Instvar Order' #setSortOrderToInstvarOrder ) ] . |
|
1501 |
(sortOrder == #alphabetical) |
|
1502 |
ifFalse:[ #('Alphabetical' #setSortOrderToAlphabetical ) ] . |
|
1503 |
} select:[:el | el notNil]. |
|
1504 |
||
1505 |
"Created: / 20-07-2012 / 10:47:53 / cg" |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1506 |
! ! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1507 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1508 |
!InspectorView methodsFor:'menu actions'! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1509 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1510 |
browse |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1511 |
|cls| |
527 | 1512 |
|
11702 | 1513 |
cls := self selectedField class. |
10436 | 1514 |
(cls browserClass ? UserPreferences current systemBrowserClass) |
1515 |
openInClass:cls selector:nil |
|
1516 |
||
1517 |
"Created: / 14-12-1995 / 19:15:50 / cg" |
|
11702 | 1518 |
"Modified: / 27-07-2012 / 22:42:44 / cg" |
527 | 1519 |
! |
1520 |
||
1521 |
browseClass |
|
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1522 |
|cls| |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1523 |
|
11702 | 1524 |
cls := self selectedField class. |
10436 | 1525 |
cls browserClass |
1526 |
openInClass:cls selector:nil |
|
1527 |
"/ browseClass:cls |
|
1528 |
||
11702 | 1529 |
"Modified: / 27-07-2012 / 22:42:39 / cg" |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1530 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1531 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1532 |
browseClassHierarchy |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1533 |
|cls| |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1534 |
|
11702 | 1535 |
cls := self selectedField class. |
527 | 1536 |
cls browserClass browseClassHierarchy:cls |
1537 |
||
11702 | 1538 |
"Modified: / 27-07-2012 / 22:42:47 / cg" |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1539 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1540 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1541 |
browseFullClassProtocol |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1542 |
|cls| |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1543 |
|
11702 | 1544 |
cls := self selectedField class. |
527 | 1545 |
cls browserClass browseFullClassProtocol:cls |
1546 |
||
11702 | 1547 |
"Modified: / 27-07-2012 / 22:42:50 / cg" |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1548 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1549 |
|
2579 | 1550 |
browseHome |
1551 |
|sel mthd| |
|
1552 |
||
11702 | 1553 |
sel := self selectedField. |
2579 | 1554 |
sel isBlock ifTrue:[ |
1555 |
mthd := sel homeMethod |
|
1556 |
] ifFalse:[ |
|
1557 |
sel isContext ifTrue:[ |
|
1558 |
mthd := sel method. |
|
1559 |
] |
|
1560 |
]. |
|
1561 |
mthd isNil ifTrue:[ |
|
1562 |
^ self warn:'Sorry - cannot figure out home method.' |
|
1563 |
]. |
|
1564 |
mthd class browserClass |
|
1565 |
openInClass:mthd mclass selector:mthd selector |
|
11702 | 1566 |
|
1567 |
"Modified: / 27-07-2012 / 22:42:55 / cg" |
|
2579 | 1568 |
! |
1569 |
||
4197 | 1570 |
browseMethodsClass |
1571 |
|mthd| |
|
1572 |
||
1573 |
mthd := self selection. |
|
1574 |
mthd mclass browserClass |
|
1575 |
openInClass:mthd mclass selector:mthd selector |
|
1576 |
! |
|
1577 |
||
7975 | 1578 |
browseUpdateMethods |
1579 |
|deps methods| |
|
1580 |
||
1581 |
deps := self selection. |
|
1582 |
methods := Set new. |
|
1583 |
deps do:[:each | |
|
1584 |
|implClass| |
|
1585 |
||
8962 | 1586 |
implClass := each class whichClassIncludesSelector:#'update:with:from:'. |
7975 | 1587 |
implClass notNil ifTrue:[ |
1588 |
methods add:(implClass compiledMethodAt:#'update:with:from:') |
|
1589 |
] |
|
1590 |
]. |
|
1591 |
methods isEmpty ifTrue:[^ self]. |
|
1592 |
||
1593 |
methods first mclass browserClass |
|
1594 |
browseMethods:methods |
|
1595 |
title:'Update Method(s) of dependent(s)' |
|
1596 |
! |
|
1597 |
||
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1598 |
doBack |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1599 |
"user selected back-menu entry" |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1600 |
|
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1601 |
|objectToInspect| |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1602 |
|
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1603 |
inspectHistory size > 0 ifTrue:[ |
8908 | 1604 |
objectToInspect := inspectHistory removeLast. |
1605 |
inspectHistory size == 0 ifTrue:[ |
|
1606 |
inspectHistory := nil |
|
1607 |
]. |
|
1608 |
self inspect:objectToInspect. |
|
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1609 |
] |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1610 |
|
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1611 |
"Created: / 22.9.1998 / 18:22:01 / cg" |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1612 |
"Modified: / 22.9.1998 / 18:22:28 / cg" |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1613 |
! |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1614 |
|
1930 | 1615 |
doBasicInspect |
1616 |
"user selected inspect-menu entry" |
|
1617 |
||
1618 |
self doInspect:true |
|
1619 |
! |
|
1620 |
||
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1621 |
doFollow |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1622 |
"user selected follow-menu entry" |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1623 |
|
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1624 |
|objectToInspect| |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1625 |
|
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1626 |
selectionIndex notNil ifTrue:[ |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1627 |
objectToInspect := self selection. |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1628 |
inspectHistory isNil ifTrue:[ |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1629 |
inspectHistory := OrderedCollection new |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1630 |
]. |
9367 | 1631 |
inspectHistory addLast:object. |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1632 |
self inspect:objectToInspect. |
1895
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1633 |
] |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1634 |
|
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1635 |
"Created: / 22.9.1998 / 18:21:08 / cg" |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1636 |
"Modified: / 22.9.1998 / 18:22:23 / cg" |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1637 |
! |
8b51d61d9c0a
added follow & back menu items.
Claus Gittinger <cg@exept.de>
parents:
1873
diff
changeset
|
1638 |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1639 |
doInspect |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1640 |
"user selected inspect-menu entry" |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1641 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1642 |
self doInspect:false |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1643 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1644 |
|
1365 | 1645 |
doNewInspect |
1646 |
self doInspect:#new |
|
1647 |
||
1648 |
"Created: / 31.10.1997 / 12:45:38 / cg" |
|
1649 |
"Modified: / 31.10.1997 / 12:47:11 / cg" |
|
1650 |
! |
|
1651 |
||
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1652 |
doStartMonitor |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1653 |
"start a monitoring process" |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1654 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1655 |
monitorProcess isNil ifTrue:[ |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1656 |
monitorProcess := |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1657 |
[ |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1658 |
|sel| |
295
92bcaa9996ae
minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
1659 |
|
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1660 |
[true] whileTrue:[ |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1661 |
(sel := selectionIndex) notNil ifTrue:[ |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1662 |
self showSelection:sel |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1663 |
]. |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1664 |
(Delay forSeconds:0.5) wait |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1665 |
] |
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
1666 |
] forkAt:Processor userBackgroundPriority |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1667 |
] |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1668 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1669 |
"Modified: 12.4.1996 / 14:20:06 / cg" |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1670 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1671 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1672 |
doStopMonitor |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1673 |
"stop the monitor" |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1674 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1675 |
monitorProcess terminate. |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1676 |
monitorProcess := nil |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1677 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1678 |
|
2800 | 1679 |
doTraceAll |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1680 |
"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
|
1681 |
|
9367 | 1682 |
self topView withWaitCursorDo:[MessageTracer traceAll:object on:Transcript] |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1683 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1684 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1685 |
doTrap |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1686 |
"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
|
1687 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1688 |
|string selector| |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1689 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1690 |
string := Dialog request:'Selector to trap on:' onCancel:nil. |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1691 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1692 |
string notNil ifTrue:[ |
8908 | 1693 |
selector := string asSymbolIfInterned. |
901 | 1694 |
|
8908 | 1695 |
selector isNil ifTrue:[ |
1696 |
self warn:'no such selector' |
|
1697 |
] ifFalse:[ |
|
9367 | 1698 |
self topView withWaitCursorDo:[MessageTracer trap:object |
8908 | 1699 |
selector:selector] |
1700 |
] |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1701 |
] |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1702 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1703 |
"Modified: 12.4.1996 / 14:07:01 / cg" |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1704 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1705 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1706 |
doTrapAll |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1707 |
"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
|
1708 |
|
9367 | 1709 |
self topView withWaitCursorDo:[MessageTracer trapAll:object] |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1710 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1711 |
|
2850 | 1712 |
doTrapAnyInstVarChange |
1713 |
"place a trap which is triggered if any instVar of the inspected object is changed" |
|
1714 |
||
1715 |
self topView withWaitCursorDo:[ |
|
9367 | 1716 |
MessageTracer trapModificationsIn:object |
2850 | 1717 |
] |
1718 |
! |
|
1719 |
||
1720 |
doTrapInstVarChange |
|
1721 |
"place a trap which is triggered if the selected instVar of the inspected object is changed" |
|
1722 |
||
1723 |
self topView withWaitCursorDo:[ |
|
1724 |
|idx| |
|
1725 |
||
1726 |
"/ a named instVar ? |
|
1727 |
idx := self instVarIndexForLine:selectionIndex. |
|
1728 |
idx isNil ifTrue:[ |
|
1729 |
self warn:'select an instance variable first.'. |
|
1730 |
^ self. |
|
1731 |
]. |
|
1732 |
MessageTracer |
|
9367 | 1733 |
trapModificationsOf:(object class allInstVarNames at:idx) |
1734 |
in:object |
|
2850 | 1735 |
] |
1736 |
! |
|
1737 |
||
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1738 |
doUntrace |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1739 |
"remove traps/traces" |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1740 |
|
9367 | 1741 |
MessageTracer untrace:object |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1742 |
! |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1743 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1744 |
inspectOwners |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1745 |
"open an inspector on owners of the inspectedObject. |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1746 |
(this is a secret function)" |
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1747 |
|
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1748 |
self withCursor:(Cursor questionMark) do:[ |
8908 | 1749 |
|owners dict| |
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1750 |
|
9367 | 1751 |
owners := (ObjectMemory whoReferences:object) asOrderedCollection. |
8908 | 1752 |
owners size > 500 ifTrue:[ |
1753 |
(self confirm:'there are ' , owners size printString , ' owners.\\Do you really want to see them all ?' withCRs) |
|
1754 |
ifFalse:[^ self] |
|
1755 |
]. |
|
1756 |
dict := IdentityDictionary new. |
|
1757 |
owners do:[:owner | |
|
1758 |
|set names oClass| |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1759 |
|
8908 | 1760 |
owner ~~ self ifTrue:[ |
1761 |
set := Set new. |
|
1762 |
names := owner class allInstVarNames. |
|
1763 |
oClass := owner class. |
|
1764 |
1 to:oClass instSize do:[:i | |
|
9367 | 1765 |
(owner instVarAt:i) == object ifTrue:[ |
8908 | 1766 |
set add:(names at:i). |
1767 |
]. |
|
1768 |
]. |
|
1769 |
oClass isVariable ifTrue:[ |
|
1770 |
oClass isPointers ifTrue:[ |
|
1771 |
1 to:owner basicSize do:[:i | |
|
9367 | 1772 |
(owner basicAt:i) == object ifTrue:[ |
8908 | 1773 |
set add:i |
1774 |
] |
|
1775 |
] |
|
1776 |
] |
|
1777 |
]. |
|
1778 |
dict at:owner put:set |
|
1779 |
]. |
|
1780 |
]. |
|
1781 |
dict inspect |
|
472
7e2d83585ed7
category rename; menu order changed
Claus Gittinger <cg@exept.de>
parents:
446
diff
changeset
|
1782 |
] |
2587
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1783 |
! |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1784 |
|
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1785 |
letSelectedObjectPerform:aSelector |
9574 | 1786 |
|sel argString| |
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1787 |
|
11702 | 1788 |
sel := self selectedField. |
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1789 |
aSelector numArgs == 0 ifTrue:[ |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1790 |
(sel perform:aSelector) inspect. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1791 |
^ self. |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1792 |
]. |
9574 | 1793 |
aSelector numArgs == 1 ifTrue:[ |
1794 |
argString := Dialog request:'Argument (Smalltalk Object)'. |
|
1795 |
argString isEmptyOrNil ifTrue:[^ self]. |
|
1796 |
(sel perform:aSelector with:(Object readFrom:argString)) inspect. |
|
1797 |
^ self. |
|
1798 |
]. |
|
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1799 |
self halt. |
9574 | 1800 |
|
11702 | 1801 |
"Modified: / 27-07-2012 / 22:43:37 / cg" |
8993
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1802 |
! |
ddf4fc887179
experimental protocol menu...
Claus Gittinger <cg@exept.de>
parents:
8962
diff
changeset
|
1803 |
|
6283
7fa17d36a91c
+openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents:
6130
diff
changeset
|
1804 |
openFileBrowser |
7fa17d36a91c
+openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents:
6130
diff
changeset
|
1805 |
|fn| |
7fa17d36a91c
+openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents:
6130
diff
changeset
|
1806 |
|
7fa17d36a91c
+openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents:
6130
diff
changeset
|
1807 |
fn := self selection. |
9615 | 1808 |
fn isNil ifTrue:[ fn := inspectedObject ]. |
8155 | 1809 |
fn isStream ifTrue:[ |
1810 |
fn := fn pathName asFilename |
|
1811 |
]. |
|
9794 | 1812 |
(UserPreferences current fileBrowserClass) openOnFileNamed:fn asFilename. |
1813 |
||
1814 |
"Modified: / 22-03-2011 / 18:05:22 / cg" |
|
6283
7fa17d36a91c
+openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents:
6130
diff
changeset
|
1815 |
! |
7fa17d36a91c
+openFileBrowser (when inspeting a filename)
Claus Gittinger <cg@exept.de>
parents:
6130
diff
changeset
|
1816 |
|
8799 | 1817 |
openWidgetHierarchy |
1818 |
|view| |
|
1819 |
||
1820 |
view := self selection. |
|
1821 |
view isView ifFalse:[^ self]. |
|
1822 |
||
1823 |
WindowTreeView openOn:view |
|
1824 |
! |
|
1825 |
||
9700 | 1826 |
saveBytesToFile |
1827 |
|fn| |
|
1828 |
||
1829 |
fn := Dialog requestFileName:'Save bytes into:'. |
|
1830 |
fn isEmptyOrNil ifTrue:[^ self]. |
|
1831 |
||
1832 |
fn asFilename contents:inspectedObject. |
|
1833 |
||
1834 |
"Modified: / 25-01-2011 / 17:23:38 / cg" |
|
1835 |
! |
|
1836 |
||
11629 | 1837 |
setDisplayRadixTo10 |
1838 |
self setDisplayRadixTo:10 |
|
1839 |
||
1840 |
"Created: / 24-08-2010 / 17:26:12 / cg" |
|
1841 |
! |
|
1842 |
||
1843 |
setDisplayRadixTo16 |
|
1844 |
self setDisplayRadixTo:16 |
|
1845 |
||
1846 |
"Created: / 24-08-2010 / 17:26:22 / cg" |
|
1847 |
! |
|
1848 |
||
1849 |
setDisplayRadixTo2 |
|
1850 |
self setDisplayRadixTo:2 |
|
1851 |
||
1852 |
"Created: / 24-08-2010 / 17:26:18 / cg" |
|
1853 |
! |
|
1854 |
||
1855 |
setDisplayRadixTo:radix |
|
1856 |
|sel| |
|
1857 |
||
1858 |
integerDisplayRadix := DefaultIntegerDisplayRadix := radix. |
|
1859 |
self reinspect. |
|
1860 |
sel := listView selection. |
|
1861 |
sel notNil ifTrue:[ |
|
1862 |
self showSelection:sel |
|
1863 |
] |
|
1864 |
||
1865 |
"Created: / 24-08-2010 / 17:26:54 / cg" |
|
1866 |
! |
|
1867 |
||
1868 |
setSortOrderTo:aSymbol |
|
1869 |
sortOrder := aSymbol. |
|
1870 |
self reinspect. |
|
1871 |
||
1872 |
"Created: / 20-07-2012 / 10:59:30 / cg" |
|
1873 |
! |
|
1874 |
||
1875 |
setSortOrderToAlphabetical |
|
1876 |
self setSortOrderTo:#alphabetical |
|
1877 |
||
1878 |
"Created: / 20-07-2012 / 10:59:52 / cg" |
|
1879 |
! |
|
1880 |
||
1881 |
setSortOrderToInstvarOrder |
|
1882 |
self setSortOrderTo:#instvarOrder |
|
1883 |
||
1884 |
"Created: / 20-07-2012 / 10:59:59 / cg" |
|
1885 |
! |
|
1886 |
||
11576 | 1887 |
showAll |
1888 |
|o| |
|
1889 |
||
1890 |
hasMore ifTrue:[ |
|
11578 | 1891 |
nShown := self numIndexedFields. |
11576 | 1892 |
"/ force update (which is otherwise ignored) |
1893 |
o := object. |
|
1894 |
inspectedObject := object := nil. |
|
1895 |
self inspect:o |
|
1896 |
] |
|
1897 |
||
1898 |
"Created: / 13-06-2012 / 09:27:45 / cg" |
|
1899 |
! |
|
1900 |
||
9737 | 1901 |
showInWindowsExplorer |
1902 |
"show in explorer" |
|
1903 |
||
1904 |
|fn dir| |
|
1905 |
||
1906 |
fn := self selection. |
|
1907 |
fn isNil ifTrue:[ fn := inspectedObject ]. |
|
1908 |
fn isStream ifTrue:[ |
|
1909 |
fn := fn pathName asFilename |
|
1910 |
]. |
|
1911 |
dir := fn isDirectory |
|
1912 |
ifTrue:[ fn ] |
|
1913 |
ifFalse:[ fn directory ]. |
|
1914 |
||
11641
17b6078ca84a
changed: #showInWindowsExplorer
Claus Gittinger <cg@exept.de>
parents:
11634
diff
changeset
|
1915 |
dir asFilename openExplorer |
9737 | 1916 |
|
1917 |
"Created: / 05-02-2011 / 15:49:33 / cg" |
|
1918 |
! |
|
1919 |
||
11576 | 1920 |
showMore |
1921 |
|o| |
|
1922 |
||
1923 |
hasMore ifTrue:[ |
|
1924 |
nShown := nShown * 2. |
|
1925 |
"/ force update (which is otherwise ignored) |
|
1926 |
o := object. |
|
1927 |
inspectedObject := object := nil. |
|
1928 |
self inspect:o |
|
1929 |
] |
|
1930 |
||
1931 |
"Modified: / 26.8.1998 / 19:05:25 / cg" |
|
1932 |
! |
|
1933 |
||
7951 | 1934 |
showOwners |
1935 |
|o| |
|
1936 |
||
1937 |
o := self selection. |
|
1938 |
self withCursor:(Cursor questionMark) do:[ |
|
1939 |
|owners dict| |
|
1940 |
||
1941 |
owners := (ObjectMemory whoReferences:o). |
|
1942 |
owners isEmptyOrNil ifTrue:[ |
|
1943 |
self information:'No owners found.'. |
|
1944 |
^ self |
|
1945 |
]. |
|
1946 |
owners := owners asOrderedCollection. |
|
1947 |
" |
|
1948 |
skip weakArrays ... (they dont count) |
|
1949 |
" |
|
1950 |
owners := owners reject:[:owner | owner isMemberOf:WeakArray]. |
|
1951 |
owners inspect. |
|
1952 |
"/ inspector := DictionaryInspectorView openOn:dict. |
|
1953 |
"/ inspector listView doubleClickAction:[:lineNr | inspector doInspectKey]. |
|
1954 |
] |
|
1955 |
||
1956 |
"Modified: 15.10.1996 / 22:09:38 / cg" |
|
1957 |
! |
|
1958 |
||
1959 |
showReferences |
|
1960 |
"user selected references-menu entry" |
|
1961 |
||
1962 |
self selection class hasImmediateInstances ifTrue:[ |
|
1963 |
^ self warn:'Sorry - cannot show references to immediate objects' |
|
1964 |
]. |
|
1965 |
ObjectMemory displayRefChainTo:(self selection) |
|
1966 |
||
1967 |
"Modified: / 30.7.1998 / 14:03:16 / cg" |
|
1968 |
! |
|
1969 |
||
2587
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1970 |
showStreamContents |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1971 |
|sel| |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1972 |
|
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1973 |
sel := self selection. |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1974 |
(sel isStream and:[sel isExternalStream not]) ifTrue:[ |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1975 |
workspace replace:(sel contents printString) |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1976 |
]. |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1977 |
|
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1978 |
"Created: / 6.2.2000 / 13:46:37 / cg" |
b6838cdb1f14
added show-stream-contents menu item
Claus Gittinger <cg@exept.de>
parents:
2580
diff
changeset
|
1979 |
"Modified: / 6.2.2000 / 13:47:37 / cg" |
73 | 1980 |
! ! |
1981 |
||
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1982 |
!InspectorView methodsFor:'presentation'! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1983 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1984 |
appendDisplayStringForElementsOf:val indent:lvl pad:padding to:aStream |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1985 |
val doWithIndex:[:el :idx | |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1986 |
|elValString| |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1987 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1988 |
aStream spaces:lvl. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1989 |
aStream nextPutAll:(' ' paddedTo:padding with:$.). |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1990 |
aStream nextPutAll:(' [',(idx printString leftPaddedTo:2),']'). |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1991 |
aStream nextPutAll:' : '. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1992 |
elValString := self basicDisplayStringForValue:el. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1993 |
aStream nextPutAll:elValString. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1994 |
aStream cr. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1995 |
"/ s nextPutAll:(self stringWithAllInstVarValuesFor:el level:lvl+4) |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1996 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1997 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1998 |
"Created: / 12-02-2012 / 09:55:53 / cg" |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
1999 |
! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2000 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2001 |
basicDisplayStringForValue:someValue |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2002 |
"return the value's displayString to be pasted into the workspace." |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2003 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2004 |
|s| |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2005 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2006 |
Error handle:[:ex | |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2007 |
s := someValue classNameWithArticle. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2008 |
displayStringMessage == #displayString ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2009 |
s := s , ' "error in displayString: ' , ex description , '"' |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2010 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2011 |
s := s , ' "error in displayString (' , displayStringMessage , '): ' , ex description , '"' |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2012 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2013 |
^ s |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2014 |
] do:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2015 |
integerDisplayRadix ~= 10 ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2016 |
"/ not everything can be shown in HEX/Binary |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2017 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2018 |
someValue isInteger ifTrue:[ |
11629 | 2019 |
(someValue < integerDisplayRadix) ifTrue:[ |
2020 |
^ someValue printString. |
|
2021 |
]. |
|
11276
d966f9687b59
changed: #basicDisplayStringForValue:
Claus Gittinger <cg@exept.de>
parents:
11251
diff
changeset
|
2022 |
s := someValue radixPrintStringRadix:integerDisplayRadix. |
d966f9687b59
changed: #basicDisplayStringForValue:
Claus Gittinger <cg@exept.de>
parents:
11251
diff
changeset
|
2023 |
s := s , ' "',(someValue printString),'"'. |
d966f9687b59
changed: #basicDisplayStringForValue:
Claus Gittinger <cg@exept.de>
parents:
11251
diff
changeset
|
2024 |
^ s |
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2025 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2026 |
(someValue isMemberOf:ByteArray) ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2027 |
s := WriteStream on:(String new:10). |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2028 |
s writeLimit:100000. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2029 |
someValue printOn:s base:integerDisplayRadix showRadix:true. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2030 |
^ s contents |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2031 |
] |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2032 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2033 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2034 |
"/ displayStringMessage := #classNameWithArticle |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2035 |
"/ displayStringMessage := #displayString |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2036 |
"/ displayStringMessage := #printString |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2037 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2038 |
s := CharacterWriteStream on:(String new:10). |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2039 |
s writeLimit:100000. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2040 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2041 |
someValue isLazyValue ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2042 |
s nextPutAll:someValue class nameWithArticle |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2043 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2044 |
"/ mhmh - avoid sending #perform: (bad for proxy objects which pass it to somewhere..) |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2045 |
displayStringMessage == #displayString ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2046 |
someValue displayOn:s. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2047 |
"/ s := someValue displayString. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2048 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2049 |
displayStringMessage == #printString ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2050 |
someValue printOn:s. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2051 |
"/ s := someValue printString. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2052 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2053 |
displayStringMessage == #storeString ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2054 |
someValue storeOn:s. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2055 |
"/ s := someValue storeString. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2056 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2057 |
^ someValue perform:displayStringMessage. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2058 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2059 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2060 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2061 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2062 |
^ s contents |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2063 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2064 |
|
11629 | 2065 |
"Modified: / 20-07-2012 / 10:54:05 / cg" |
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2066 |
! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2067 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2068 |
displayStringForValue:someValue |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2069 |
"return the value's displayString to be pasted into the workspace." |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2070 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2071 |
|idx sel extraAttributes| |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2072 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2073 |
idx := self theSingleSelectionIndex. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2074 |
idx notNil ifTrue:[ |
11511 | 2075 |
sel := self listEntryAt:idx. |
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2076 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2077 |
extraAttributes := object inspectorExtraAttributes. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2078 |
(extraAttributes notNil and:[extraAttributes includesKey:sel]) ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2079 |
^ someValue "(extraAttributes at:sel) value" printString |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2080 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2081 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2082 |
(sel startsWith:'-all inst vars') ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2083 |
^ self stringWithAllInstVarValues |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2084 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2085 |
(sel startsWith:'-all indexed vars') ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2086 |
^ self stringWithAllIndexedVarValues |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2087 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2088 |
(sel startsWith:'-all messages') ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2089 |
^ self stringWithMessages:#all |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2090 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2091 |
(sel startsWith:'-local messages') ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2092 |
^ self stringWithMessages:#local |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2093 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2094 |
(sel startsWith:'-inherited messages') ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2095 |
^ self stringWithMessages:#inherited |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2096 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2097 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2098 |
^ self basicDisplayStringForValue:someValue |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2099 |
|
11511 | 2100 |
"Modified: / 16-05-2012 / 17:55:05 / cg" |
2101 |
! |
|
2102 |
||
2103 |
iconForValue: anObject |
|
2104 |
anObject isNil ifTrue:[ |
|
2105 |
^ self class imageFor_nil |
|
2106 |
]. |
|
2107 |
anObject isNumber ifTrue:[ |
|
2108 |
anObject isInteger ifTrue:[ |
|
2109 |
^ self class imageFor_integers |
|
2110 |
]. |
|
2111 |
anObject isFloat ifTrue:[ |
|
2112 |
^ self class imageFor_floats |
|
2113 |
]. |
|
2114 |
anObject isFraction ifTrue:[ |
|
2115 |
^ self class imageFor_fractions |
|
2116 |
]. |
|
2117 |
]. |
|
11514 | 2118 |
anObject isCollection ifTrue:[ |
2119 |
anObject isString ifTrue:[ |
|
2120 |
anObject isSymbol ifTrue:[ |
|
2121 |
^ self class imageFor_symbols |
|
2122 |
]. |
|
2123 |
^ self class imageFor_strings |
|
11511 | 2124 |
]. |
11514 | 2125 |
(anObject isKindOf:Dictionary) ifTrue:[ |
2126 |
^ self class imageFor_dictionaries |
|
2127 |
]. |
|
2128 |
(anObject isArray) ifTrue:[ |
|
2129 |
^ self class imageFor_arrays |
|
2130 |
]. |
|
11521
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
2131 |
(anObject isSequenceable) ifTrue:[ |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
2132 |
^ self class imageFor_sequenceableCollections |
edf68f0ed11c
added: #imageFor_sequenceableCollections
Claus Gittinger <cg@exept.de>
parents:
11519
diff
changeset
|
2133 |
]. |
11514 | 2134 |
^ self class imageFor_collections |
11511 | 2135 |
]. |
2136 |
anObject == true ifTrue:[ |
|
2137 |
^ self class imageFor_true |
|
2138 |
]. |
|
2139 |
anObject == false ifTrue:[ |
|
2140 |
^ self class imageFor_false |
|
2141 |
]. |
|
2142 |
anObject isCharacter ifTrue:[ |
|
2143 |
^ self class imageFor_characters |
|
2144 |
]. |
|
2145 |
anObject isBehavior ifTrue:[ |
|
2146 |
^ self class imageFor_classes |
|
2147 |
]. |
|
2148 |
^ self class imageFor_others |
|
2149 |
||
2150 |
"Created: / 16-05-2012 / 17:58:20 / cg" |
|
2151 |
! |
|
2152 |
||
2153 |
listEntryForName:nameString value:value |
|
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2154 |
|entryString| |
11517 | 2155 |
|
2156 |
UserPreferences current showTypeIndicatorInInspector ifFalse:[ |
|
2157 |
^ nameString |
|
2158 |
]. |
|
11511 | 2159 |
|
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2160 |
entryString := nameString allBold,(self valueStringInListEntryForValue:value). |
11748
880356e33f08
changed: #listEntryForName:value:
Claus Gittinger <cg@exept.de>
parents:
11715
diff
changeset
|
2161 |
(value isColor and:[value red notNil]) ifTrue:[ |
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2162 |
entryString := entryString |
11547
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
2163 |
, ' ' , (' ' |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
2164 |
colorizeAllWith:((value brightness < 0.5) |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
2165 |
ifTrue:[ Color white ] |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
2166 |
ifFalse:[ Color black ]) |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
2167 |
on:value). |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
2168 |
]. |
ebc7b2190f54
comment/format in: #reinspect
Claus Gittinger <cg@exept.de>
parents:
11521
diff
changeset
|
2169 |
|
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2170 |
^ LabelAndIcon string:entryString image:(self iconForValue:value) |
11511 | 2171 |
|
2172 |
"Created: / 16-05-2012 / 18:42:28 / cg" |
|
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2173 |
! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2174 |
|
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2175 |
plainValueStringInListEntryForValue:value |
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2176 |
"returns nil or a string to show in angle brackets" |
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2177 |
|
11587
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2178 |
|s| |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2179 |
|
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2180 |
UserPreferences current showTypeIndicatorInInspector ifFalse:[^ nil]. |
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2181 |
|
11587
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2182 |
value class == ValueHolder ifTrue:[ |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2183 |
s := self plainValueStringInListEntryForValue:value value. |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2184 |
s notNil ifTrue:[ |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2185 |
^ '[[' , s , ']]' |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2186 |
]. |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2187 |
^ nil |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2188 |
]. |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2189 |
|
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2190 |
(value isNumber or:[value isBoolean]) ifTrue:[ |
11629 | 2191 |
^ self basicDisplayStringForValue:value "value printString" |
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2192 |
]. |
11644
65b3f2a82ba7
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11641
diff
changeset
|
2193 |
(value isSymbol) ifTrue:[ |
11587
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2194 |
^ value storeString |
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2195 |
]. |
11644
65b3f2a82ba7
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11641
diff
changeset
|
2196 |
(value isCharacter) ifTrue:[ |
65b3f2a82ba7
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11641
diff
changeset
|
2197 |
(value codePoint <= 16r7f) ifTrue:[ |
65b3f2a82ba7
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11641
diff
changeset
|
2198 |
^ value storeString,(' "16r%1 %2"' bindWith:(value codePoint hexPrintString) with:value codePoint) |
65b3f2a82ba7
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11641
diff
changeset
|
2199 |
]. |
65b3f2a82ba7
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11641
diff
changeset
|
2200 |
^ value storeString,(' "%1"' bindWith:(value codePoint)) |
65b3f2a82ba7
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11641
diff
changeset
|
2201 |
]. |
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2202 |
value isString ifTrue:[ |
11587
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2203 |
^ value contractTo:30. |
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2204 |
]. |
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2205 |
value isColor ifTrue:[ |
11587
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2206 |
^ value htmlPrintString |
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2207 |
]. |
11587
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2208 |
value isNil ifTrue:[ |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2209 |
^ 'nil' |
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2210 |
]. |
11594 | 2211 |
(value isClass and:[value name notEmptyOrNil]) ifTrue:[ |
2212 |
^ value name |
|
2213 |
]. |
|
11587
916e12f6b843
changed: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11580
diff
changeset
|
2214 |
^ value classNameWithArticle "nil" |
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2215 |
|
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2216 |
"Created: / 13-06-2012 / 12:50:26 / cg" |
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2217 |
! |
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2218 |
|
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2219 |
stringWithAllIndexedVarValues |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2220 |
|nIdx s names maxLen varString padLeft| |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2221 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2222 |
nIdx := object size. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2223 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2224 |
s := CharacterWriteStream on:''. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2225 |
names := self indexList. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2226 |
names size > 0 ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2227 |
maxLen := (names collect:[:eachName | eachName printString size]) max. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2228 |
padLeft := names conform:[:eachIdx | eachIdx isInteger]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2229 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2230 |
names do:[:eachIdx | |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2231 |
|val| |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2232 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2233 |
padLeft ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2234 |
s nextPutAll:(eachIdx printStringLeftPaddedTo:maxLen). |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2235 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2236 |
s nextPutAll:((eachIdx printString , ' ') paddedTo:maxLen+1 with:$.). |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2237 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2238 |
s nextPutAll:' : '. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2239 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2240 |
val := self indexedValueAtKey:eachIdx. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2241 |
|
11251 | 2242 |
((ExpandArraysInAllLists == true) and:[val isSequenceable and:[ val class isPointers]]) ifTrue:[ |
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2243 |
s cr. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2244 |
self appendDisplayStringForElementsOf:val indent:2 pad:maxLen+1+1 to:s. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2245 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2246 |
varString := self basicDisplayStringForValue:val. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2247 |
(varString includes:Character cr) ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2248 |
varString := varString copyTo:(varString indexOf:Character cr)-1. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2249 |
varString := varString , '...'. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2250 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2251 |
s nextPutLine:varString. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2252 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2253 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2254 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2255 |
nShown < nIdx ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2256 |
s nextPutLine:' ...'. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2257 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2258 |
^ s contents |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2259 |
|
11251 | 2260 |
"Modified: / 12-02-2012 / 10:52:04 / cg" |
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2261 |
! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2262 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2263 |
stringWithAllInstVarValues |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2264 |
^ self stringWithAllInstVarValuesFor:object level:0 |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2265 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2266 |
"Modified: / 31-01-2012 / 18:23:11 / cg" |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2267 |
! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2268 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2269 |
stringWithAllInstVarValuesFor:anObject level:lvl |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2270 |
|s names maxLen| |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2271 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2272 |
s := CharacterWriteStream on:''. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2273 |
names := anObject class allInstVarNames. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2274 |
maxLen := (names collect:[:eachName | eachName size]) max. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2275 |
names keysAndValuesDo:[:eachInstVarIndex :eachInstVarName | |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2276 |
|val valString| |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2277 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2278 |
val := anObject instVarAt:eachInstVarIndex. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2279 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2280 |
s spaces:lvl. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2281 |
s nextPutAll:((eachInstVarName , ' ') paddedTo:maxLen+1 with:$.). |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2282 |
s nextPutAll:' : '. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2283 |
|
11251 | 2284 |
((ExpandArraysInAllLists == true) and:[val isSequenceable and:[ val class isPointers] ]) ifTrue:[ |
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2285 |
s cr. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2286 |
self appendDisplayStringForElementsOf:val indent:lvl pad:maxLen+1+1 to:s. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2287 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2288 |
valString := self basicDisplayStringForValue:val. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2289 |
(valString includes:Character cr) ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2290 |
valString := valString copyTo:(valString indexOf:Character cr)-1. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2291 |
valString := valString , '...'. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2292 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2293 |
s nextPutAll:valString. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2294 |
s cr. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2295 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2296 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2297 |
^ s contents |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2298 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2299 |
"Created: / 31-01-2012 / 18:23:15 / cg" |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2300 |
! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2301 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2302 |
stringWithMessages:which |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2303 |
|cls s messages | |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2304 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2305 |
s := CharacterWriteStream on:''. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2306 |
cls := object class. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2307 |
which == #local ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2308 |
messages := cls selectors. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2309 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2310 |
which == #all ifTrue:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2311 |
messages := cls allSelectors. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2312 |
] ifFalse:[ |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2313 |
messages := cls allSelectors copy asSet removeAll:cls selectors; yourself. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2314 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2315 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2316 |
|
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2317 |
messages asOrderedCollection sort do:[:eachSelector | |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2318 |
s nextPutAll:eachSelector. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2319 |
s cr. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2320 |
]. |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2321 |
^ s contents |
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2322 |
! |
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2323 |
|
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2324 |
valueStringInListEntryForValue:value |
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2325 |
"returns something to append to the name" |
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2326 |
|
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2327 |
|valString| |
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2328 |
|
11580
0bcaed8e460b
added: #plainValueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11579
diff
changeset
|
2329 |
valString := self plainValueStringInListEntryForValue:value. |
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2330 |
valString isNil ifTrue:[^ '']. |
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2331 |
^ ' <',valString,'>' |
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2332 |
|
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2333 |
"Created: / 13-06-2012 / 12:04:31 / cg" |
11250
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2334 |
! ! |
a7ed642b37fa
added: #appendDisplayStringForElementsOf:indent:pad:to:
Claus Gittinger <cg@exept.de>
parents:
11247
diff
changeset
|
2335 |
|
200 | 2336 |
!InspectorView methodsFor:'private'! |
2337 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2338 |
baseInspectedObjectClass |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2339 |
^ Object |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2340 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2341 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2342 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2343 |
|
647 | 2344 |
defaultLabel |
9736 | 2345 |
^ 'InstVars & Pseudo Slots' |
2346 |
||
2347 |
"Modified: / 05-02-2011 / 14:06:26 / cg" |
|
647 | 2348 |
! |
2349 |
||
6850 | 2350 |
derivedFieldNames |
9701 | 2351 |
|d actionItems valueItems otherItems| |
7297 | 2352 |
|
2353 |
d := self derivedFields. |
|
2354 |
(d isKindOf:Dictionary) ifTrue:[ |
|
9701 | 2355 |
actionItems := d keys select:[:k | k startsWith:'!!'] as:OrderedCollection . |
2356 |
valueItems := d keys select:[:k | k startsWith:'-'] as:OrderedCollection. |
|
2357 |
otherItems := d keys select:[:k | (k startsWithAnyOf:#('!!' '-')) not] as:OrderedCollection. |
|
2358 |
^ ((actionItems sort , valueItems sort) collect:[:k | (k copyTo:1),(k copyFrom:2) allItalic]) |
|
2359 |
, |
|
2360 |
otherItems sort |
|
7297 | 2361 |
]. |
2362 |
^ d collect:[:eachEntry | |
|
6850 | 2363 |
|nm| |
2364 |
||
2365 |
nm := (eachEntry isAssociation) |
|
2366 |
ifTrue:[ eachEntry key ] |
|
2367 |
ifFalse:[ eachEntry first ]. |
|
8699 | 2368 |
'-',nm allItalic |
6850 | 2369 |
] |
2370 |
||
2371 |
"Created: / 03-08-2006 / 15:02:54 / cg" |
|
9701 | 2372 |
"Modified: / 27-01-2011 / 11:45:17 / cg" |
6850 | 2373 |
! |
2374 |
||
6823 | 2375 |
derivedFields |
7054 | 2376 |
"the check below is not sufficient - if someone catches messages, for example. |
2377 |
Therefore, we do a manual lookup here:" |
|
8962 | 2378 |
|
2379 |
(object class whichClassIncludesSelector:#inspectorExtraAttributes) isNil ifTrue:[ |
|
7054 | 2380 |
^ #() |
2381 |
]. |
|
6823 | 2382 |
^ [object inspectorExtraAttributes] |
2383 |
on: MessageNotUnderstood |
|
6850 | 2384 |
do: [:ex | ex return: #() ] |
6823 | 2385 |
|
2386 |
"Created: / 17-07-2006 / 11:02:32 / cg" |
|
7054 | 2387 |
"Modified: / 29-08-2006 / 13:03:31 / cg" |
6823 | 2388 |
! |
2389 |
||
6850 | 2390 |
extraNamedFieldNames |
2391 |
^ self extraNamedFields |
|
2392 |
collect:[:eachEntry | |
|
2393 |
|nm| |
|
2394 |
||
2395 |
nm := (eachEntry isAssociation) |
|
2396 |
ifTrue:[ eachEntry key ] |
|
2397 |
ifFalse:[ eachEntry first ]. |
|
2398 |
'`',nm |
|
2399 |
] |
|
2400 |
||
2401 |
"Modified: / 03-08-2006 / 15:17:19 / cg" |
|
2402 |
! |
|
2403 |
||
2404 |
extraNamedFields |
|
6940 | 2405 |
"by redefining inspectorExtraNamedFields to return an array of |
2406 |
pseudo-fieldName->value associations, the inspectors left list can be extended" |
|
2407 |
||
7054 | 2408 |
"the check below is not sufficient - if someone catches messages, for example. |
2409 |
Therefore, we do a manual lookup here:" |
|
8962 | 2410 |
|
2411 |
(object class whichClassIncludesSelector:#inspectorExtraNamedFields) isNil ifTrue:[ |
|
7054 | 2412 |
^ #() |
2413 |
]. |
|
6850 | 2414 |
^ [object inspectorExtraNamedFields] |
2415 |
on: MessageNotUnderstood |
|
6940 | 2416 |
do: [:ex | ex return: #() ] |
6850 | 2417 |
|
2418 |
"Created: / 03-08-2006 / 13:34:18 / cg" |
|
7054 | 2419 |
"Modified: / 29-08-2006 / 13:03:57 / cg" |
6850 | 2420 |
! |
2421 |
||
2422 |
extraNamedVarIndexForLine:lineNr |
|
2423 |
"helper - return the index for a named instVar; |
|
2424 |
nil, if self or a keyed instvar is selected." |
|
2425 |
||
2426 |
|idx nNamedInstvarsShown nExtraNamedInstvarsShown cls baseCls firstRealIndex line| |
|
2427 |
||
2428 |
lineNr isNil ifTrue:[^ nil]. |
|
2429 |
firstRealIndex := 1. |
|
2430 |
||
2431 |
idx := lineNr. |
|
2432 |
self hasSelfEntry ifTrue:[ |
|
2433 |
(lineNr == 1 or:[lineNr isNil]) ifTrue:[ |
|
2434 |
^ nil "/ self selected |
|
2435 |
]. |
|
2436 |
idx := idx - 1. |
|
2437 |
firstRealIndex := 2. |
|
2438 |
]. |
|
2439 |
||
11511 | 2440 |
[line := self listEntryAt:firstRealIndex. |
6850 | 2441 |
(line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[ |
2442 |
firstRealIndex := firstRealIndex + 1. |
|
2443 |
idx := idx - 1. |
|
2444 |
]. |
|
2445 |
||
9367 | 2446 |
cls := object class. |
6850 | 2447 |
baseCls := self baseInspectedObjectClass. |
2448 |
||
2449 |
nNamedInstvarsShown := cls instSize. |
|
2450 |
"/ only the namedInstvars below baseInspectedObjectClass |
|
2451 |
"/ are shown ... |
|
2452 |
(cls == baseCls or:[cls isSubclassOf:baseCls]) ifTrue:[ |
|
2453 |
nNamedInstvarsShown := nNamedInstvarsShown - baseCls instSize. |
|
2454 |
]. |
|
2455 |
||
2456 |
idx := idx - nNamedInstvarsShown. |
|
2457 |
idx < 1 ifTrue:[ |
|
2458 |
^ nil. |
|
2459 |
]. |
|
2460 |
||
2461 |
nExtraNamedInstvarsShown := self extraNamedFields size. |
|
2462 |
idx <= nExtraNamedInstvarsShown ifTrue:[ |
|
2463 |
^ idx. |
|
2464 |
]. |
|
2465 |
||
2466 |
^ nil "/ indexed instvar or other selected |
|
2467 |
||
2468 |
"Created: / 03-08-2006 / 13:45:14 / cg" |
|
11511 | 2469 |
"Modified: / 16-05-2012 / 17:54:52 / cg" |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2470 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2471 |
|
200 | 2472 |
fieldList |
2473 |
"return a list of names to show in the selectionList. |
|
2474 |
Leave hasMore as true, if a '...' entry should be added." |
|
2475 |
||
6840 | 2476 |
|derivedFieldList namedFieldList fieldList cls indexedList extraNamedFieldList| |
200 | 2477 |
|
9367 | 2478 |
object isNil ifTrue:[ |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
2479 |
^ self hasSelfEntry ifFalse:[ #() ] ifTrue:[ #('-self') ] |
3338 | 2480 |
]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2481 |
|
9367 | 2482 |
cls := object class. |
7297 | 2483 |
|
2275 | 2484 |
self topView withWaitCursorDo:[ |
6823 | 2485 |
namedFieldList := self namedFieldList. |
3868 | 2486 |
indexedList := self indexedFieldList. |
6840 | 2487 |
extraNamedFieldList := OrderedCollection new. |
3349 | 2488 |
|
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
2489 |
self hasSelfEntry ifTrue:[ |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
2490 |
self suppressPseudoSlots ifFalse:[ |
6823 | 2491 |
derivedFieldList := OrderedCollection new. |
9370 | 2492 |
derivedFieldList addAll:(self pseudoFieldNamesWithIndexed:(indexedList notEmptyOrNil)). |
6850 | 2493 |
derivedFieldList addAll:(self derivedFieldNames). |
7297 | 2494 |
extraNamedFieldList addAll:(self extraNamedFieldNames). |
3608 | 2495 |
]. |
3525 | 2496 |
]. |
531 | 2497 |
|
6823 | 2498 |
fieldList := OrderedCollection new. |
2499 |
derivedFieldList notNil ifTrue:[fieldList addAll:derivedFieldList]. |
|
2500 |
namedFieldList notNil ifTrue:[fieldList addAll:namedFieldList]. |
|
6840 | 2501 |
extraNamedFieldList notNil ifTrue:[fieldList addAll:extraNamedFieldList]. |
6823 | 2502 |
indexedList notNil ifTrue:[fieldList addAll:indexedList]. |
200 | 2503 |
]. |
6823 | 2504 |
^ fieldList |
531 | 2505 |
|
7297 | 2506 |
"Modified: / 18-09-2006 / 21:16:03 / cg" |
200 | 2507 |
! |
2508 |
||
295
92bcaa9996ae
minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2509 |
hasSelfEntry |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
2510 |
^ hideReceiver not and:[self suppressPseudoSlots not] |
295
92bcaa9996ae
minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2511 |
|
92bcaa9996ae
minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2512 |
"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
|
2513 |
"Modified: 28.6.1996 / 15:13:41 / cg" |
295
92bcaa9996ae
minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2514 |
! |
92bcaa9996ae
minor changes for ContextInspector required
Claus Gittinger <cg@exept.de>
parents:
268
diff
changeset
|
2515 |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2516 |
indexList |
9557
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2517 |
"return a list of indexes usable to access the object's indexed slots. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2518 |
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
|
2519 |
|
11511 | 2520 |
|objSz n cls list| |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2521 |
|
9367 | 2522 |
cls := object class. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2523 |
|
3868 | 2524 |
cls isVariable ifFalse:[^ nil ]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2525 |
|
11578 | 2526 |
n := objSz := self numIndexedFields. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2527 |
(n > nShown) ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2528 |
n := nShown. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2529 |
hasMore := true. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2530 |
]. |
11511 | 2531 |
list := (1 to:n). |
2532 |
^ list |
|
2533 |
"/ keysAndValuesCollect:[:idx :nm | |
|
2534 |
"/ LabelAndIcon string:nm image:(self iconForValue:(object basicAt:idx)) |
|
2535 |
"/ ]. |
|
2536 |
||
11578 | 2537 |
"Modified: / 13-06-2012 / 10:14:13 / cg" |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2538 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2539 |
|
9367 | 2540 |
indexOfFirstNamedInstvarInList |
2541 |
"helper - return the index for the first named instVar; |
|
2542 |
nil, if self or a keyed instvar is selected." |
|
2543 |
||
2544 |
|firstRealIndex| |
|
2545 |
||
2546 |
firstRealIndex := 1. |
|
2547 |
self hasSelfEntry ifTrue:[ |
|
2548 |
firstRealIndex := 2. |
|
2549 |
]. |
|
2550 |
||
2551 |
[ |
|
2552 |
|line| |
|
2553 |
||
11511 | 2554 |
line := self listEntryAt:firstRealIndex. |
9367 | 2555 |
(line startsWith:'-') and:[line size < 2 or:[line second isDigit not]] |
2556 |
] whileTrue:[ |
|
2557 |
firstRealIndex := firstRealIndex + 1. |
|
2558 |
]. |
|
2559 |
^ firstRealIndex |
|
11511 | 2560 |
|
2561 |
"Modified: / 16-05-2012 / 17:54:46 / cg" |
|
9367 | 2562 |
! |
2563 |
||
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2564 |
indexedFieldList |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2565 |
"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
|
2566 |
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
|
2567 |
|
11511 | 2568 |
|l maxIndex sz list| |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2569 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2570 |
l := self indexList. |
10858 | 2571 |
l isEmptyOrNil ifTrue:[^ nil ]. |
9557
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2572 |
|
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2573 |
integerDisplayRadix ~~ 10 ifTrue:[ |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2574 |
maxIndex := l last. |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2575 |
maxIndex isInteger ifTrue:[ |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2576 |
sz := (maxIndex printStringRadix:integerDisplayRadix) size. |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2577 |
] ifFalse:[ |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2578 |
sz := 0 |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2579 |
]. |
11511 | 2580 |
list := l collect: |
2581 |
[:i | |
|
2582 |
i isInteger ifTrue:[ |
|
2583 |
(i printStringRadix:integerDisplayRadix size:sz fill:$0) |
|
2584 |
] ifFalse:[ |
|
2585 |
i printString |
|
2586 |
] |
|
9557
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2587 |
] |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2588 |
] ifFalse:[ |
11511 | 2589 |
list := l collect:[:i | i printString]. |
9557
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2590 |
]. |
14b8fe98a8ed
can now display values and indices in binary and hex.
Claus Gittinger <cg@exept.de>
parents:
9504
diff
changeset
|
2591 |
|
11511 | 2592 |
^ list |
2593 |
keysAndValuesCollect:[:idx :nm | |
|
11519 | 2594 |
self listEntryForName:nm value:(object at:idx) |
11511 | 2595 |
]. |
2596 |
||
2597 |
^ list. |
|
2598 |
||
2599 |
"Modified: / 16-05-2012 / 18:43:10 / cg" |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2600 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2601 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2602 |
indexedValueAtIndex:idx |
9367 | 2603 |
^ object basicAt:idx |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2604 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2605 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
2606 |
indexedValueAtIndex:idx put:newValue |
9367 | 2607 |
object basicAt:idx put:newValue |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2608 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2609 |
|
3884 | 2610 |
indexedValueAtKey:key |
4314 | 2611 |
"/ kludge |
9367 | 2612 |
object isLimitedPrecisionReal ifTrue:[ |
2613 |
^ object basicAt:key |
|
4314 | 2614 |
]. |
9367 | 2615 |
^ object at:key |
3884 | 2616 |
! |
2617 |
||
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2618 |
instVarIndexForLine:lineNr |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2619 |
"helper - return the index for a named instVar; |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2620 |
nil, if self or a keyed instvar is selected." |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2621 |
|
11629 | 2622 |
|idx nNamedInstvarsShown cls baseCls firstRealIndex line nm| |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2623 |
|
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2624 |
lineNr isNil ifTrue:[^ nil]. |
3349 | 2625 |
firstRealIndex := 1. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2626 |
|
11629 | 2627 |
line := (self listEntryAt:lineNr) string. |
2628 |
((line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]) |
|
2629 |
ifTrue:[^ nil]. |
|
2630 |
||
2631 |
nm := line asCollectionOfWords first. |
|
2632 |
idx := object class allInstVarNames indexOf:nm. |
|
2633 |
idx == 0 ifTrue:[^ nil]. |
|
2634 |
^ idx. |
|
2635 |
||
2636 |
[ |
|
2637 |
line := self listEntryAt:firstRealIndex. |
|
2638 |
(line startsWith:'-') and:[line size < 2 or:[line second isDigit not]] |
|
2639 |
] whileTrue:[ |
|
3349 | 2640 |
firstRealIndex := firstRealIndex + 1. |
2641 |
idx := idx - 1. |
|
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2642 |
]. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2643 |
|
9367 | 2644 |
cls := object class. |
2447 | 2645 |
baseCls := self baseInspectedObjectClass. |
2646 |
||
2647 |
nNamedInstvarsShown := cls instSize. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2648 |
"/ only the namedInstvars below baseInspectedObjectClass |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2649 |
"/ are shown ... |
8962 | 2650 |
(cls includesBehavior:baseCls) ifTrue:[ |
2447 | 2651 |
nNamedInstvarsShown := nNamedInstvarsShown - baseCls instSize. |
2652 |
]. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2653 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2654 |
idx <= nNamedInstvarsShown ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2655 |
^ idx + self baseInspectedObjectClass instSize. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2656 |
]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2657 |
^ nil "/ indexed instvar or other selected |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2658 |
|
11629 | 2659 |
"Modified: / 20-07-2012 / 11:11:10 / cg" |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2660 |
! |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2661 |
|
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2662 |
keyIndexForLine:lineNr |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2663 |
"helper - return the index of the key-list; |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2664 |
nil, if self or a namedInstVar is selected." |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2665 |
|
6840 | 2666 |
|idx nNamedInstvarsShown nExtraNamedInstvarsShown cls baseCls firstRealIndex line| |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2667 |
|
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2668 |
lineNr isNil ifTrue:[^ nil]. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2669 |
|
3349 | 2670 |
firstRealIndex := 1. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2671 |
idx := lineNr. |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
2672 |
self hasSelfEntry ifTrue:[ |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2673 |
(lineNr == 1 or:[lineNr isNil]) ifTrue:[ |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2674 |
^ nil "/ self selected |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2675 |
]. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2676 |
idx := idx - 1. |
3349 | 2677 |
firstRealIndex := firstRealIndex + 1. |
2678 |
]. |
|
2679 |
||
11511 | 2680 |
[line := self listEntryAt:firstRealIndex. |
5881
ef6791c315ab
oops - out of bounds error fixed
Claus Gittinger <cg@exept.de>
parents:
5845
diff
changeset
|
2681 |
line notNil |
ef6791c315ab
oops - out of bounds error fixed
Claus Gittinger <cg@exept.de>
parents:
5845
diff
changeset
|
2682 |
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
|
2683 |
] whileTrue:[ |
3349 | 2684 |
firstRealIndex := firstRealIndex + 1. |
2685 |
idx := idx - 1. |
|
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2686 |
]. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2687 |
|
9367 | 2688 |
cls := object class. |
2447 | 2689 |
baseCls := self baseInspectedObjectClass. |
2690 |
||
2691 |
nNamedInstvarsShown := cls instSize. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2692 |
"/ only the namedInstvars below baseInspectedObjectClass |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2693 |
"/ are shown ... |
8962 | 2694 |
(cls includesBehavior:baseCls) ifTrue:[ |
2447 | 2695 |
nNamedInstvarsShown := nNamedInstvarsShown - baseCls instSize. |
2696 |
]. |
|
6850 | 2697 |
nExtraNamedInstvarsShown := self extraNamedFields size. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2698 |
|
6840 | 2699 |
idx <= (nNamedInstvarsShown+nExtraNamedInstvarsShown) ifTrue:[ |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2700 |
^ nil "/ named instVar selected. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2701 |
]. |
6840 | 2702 |
^ idx - (nNamedInstvarsShown+nExtraNamedInstvarsShown). |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2188
diff
changeset
|
2703 |
|
11511 | 2704 |
"Modified: / 16-05-2012 / 17:54:34 / cg" |
2705 |
! |
|
2706 |
||
2707 |
listEntryAt:lineNr |
|
11514 | 2708 |
|entry| |
2709 |
||
2710 |
entry := listView at:lineNr. |
|
2711 |
entry isNil ifTrue:[^ entry]. |
|
2712 |
^ entry string |
|
11511 | 2713 |
|
2714 |
"Created: / 16-05-2012 / 17:53:39 / cg" |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2715 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2716 |
|
9367 | 2717 |
namedFieldAt:idx |
2718 |
^ object instVarAt:idx |
|
2719 |
! |
|
2720 |
||
2721 |
namedFieldAt:idx put:newValue |
|
2722 |
^ object instVarAt:idx put:newValue |
|
2723 |
! |
|
2724 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2725 |
namedFieldList |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2726 |
"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
|
2727 |
|
11715 | 2728 |
|aList cls baseCls offset| |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2729 |
|
9367 | 2730 |
cls := object class. |
2447 | 2731 |
baseCls := self baseInspectedObjectClass. |
2732 |
||
3351 | 2733 |
aList := OrderedCollection new. |
3338 | 2734 |
|
3351 | 2735 |
aList addAll:(cls allInstVarNames). |
11715 | 2736 |
offset := 0. |
8962 | 2737 |
(cls includesBehavior:baseCls) ifTrue:[ |
3351 | 2738 |
"/ hide some stuff |
11715 | 2739 |
offset := self baseInspectedObjectClass instSize. |
2740 |
aList := aList copyFrom:(offset + 1). |
|
3351 | 2741 |
]. |
11629 | 2742 |
aList := aList |
2743 |
keysAndValuesCollect:[:idx :nm | |
|
11715 | 2744 |
self listEntryForName:nm value:(object instVarAt:idx+offset) |
11629 | 2745 |
]. |
2746 |
sortOrder == #alphabetical ifTrue:[ |
|
2747 |
aList sort:[:a :b | a string < b string]. |
|
2748 |
]. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2749 |
^ aList |
3349 | 2750 |
|
11715 | 2751 |
"Modified: / 29-07-2012 / 12:11:06 / cg" |
6372 | 2752 |
! |
2753 |
||
11578 | 2754 |
numIndexedFields |
2755 |
^ inspectedObject basicSize |
|
2756 |
||
2757 |
"Created: / 13-06-2012 / 10:13:24 / cg" |
|
2758 |
! |
|
2759 |
||
9370 | 2760 |
pseudoFieldNames |
2761 |
"return a list of names to show in the selectionList. |
|
2762 |
Leave hasMore as true, if a '...' entry should be added." |
|
2763 |
||
11565 | 2764 |
^ self pseudoFieldNamesWithIndexed: object class isVariable |
2765 |
||
2766 |
"Modified: / 06-06-2012 / 11:56:56 / cg" |
|
9370 | 2767 |
! |
2768 |
||
2769 |
pseudoFieldNamesWithIndexed:withIndexed |
|
2770 |
"return a list of names to show in the selectionList. |
|
2771 |
Leave hasMore as true, if a '...' entry should be added." |
|
2772 |
||
2773 |
|list cls| |
|
2774 |
||
2775 |
cls := object class. |
|
2776 |
||
2777 |
list := OrderedCollection new. |
|
2778 |
list add:'-' , 'self' allItalic. |
|
2779 |
list add:'-' , 'local messages' allItalic. |
|
2780 |
"/ list add:'-' , 'inherited messages' allItalic. |
|
2781 |
list add:'-' , 'all messages' allItalic. |
|
2782 |
list add:'-' , 'hash' allItalic. |
|
2783 |
list add:'-' , 'identityHash' allItalic. |
|
2784 |
||
11565 | 2785 |
withIndexed ifTrue:[ |
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2786 |
list add:'-' , 'basicSize' allItalic, (self valueStringInListEntryForValue:object basicSize). |
11565 | 2787 |
]. |
2788 |
object isCollection ifTrue:[ |
|
2789 |
(cls whichClassImplements:#size) == (cls whichClassImplements:#basicSize) ifFalse:[ |
|
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2790 |
list add:'-' , 'size' allItalic , (self valueStringInListEntryForValue:object size). |
11565 | 2791 |
] |
2792 |
]. |
|
2793 |
||
9370 | 2794 |
cls hasImmediateInstances ifFalse:[ |
2795 |
object dependents notEmptyOrNil ifTrue:[ |
|
2796 |
list add:'-' , 'dependents' allItalic. |
|
2797 |
]. |
|
2798 |
]. |
|
2799 |
cls instSize > 0 ifTrue:[ |
|
2800 |
list add:'-' , 'all inst vars' allItalic. |
|
2801 |
]. |
|
2802 |
(withIndexed and:[self showAllIndexedVarsInFieldList]) ifTrue:[ |
|
2803 |
list add:'-' , 'all indexed vars' allItalic. |
|
2804 |
]. |
|
2805 |
^ list |
|
11565 | 2806 |
|
11579
0c14b5d9c07f
added: #valueStringInListEntryForValue:
Claus Gittinger <cg@exept.de>
parents:
11578
diff
changeset
|
2807 |
"Modified: / 13-06-2012 / 12:10:16 / cg" |
9370 | 2808 |
! |
2809 |
||
3608 | 2810 |
setAcceptAction |
2811 |
"set the codeViews accept action" |
|
2812 |
||
9375
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2813 |
|idx acceptAction sel| |
3608 | 2814 |
|
2815 |
acceptAction := [:theText | self doAccept:theText asString]. |
|
2816 |
||
9375
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2817 |
idx := self theSingleSelectionIndex. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2818 |
|
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2819 |
(idx isNil |
9367 | 2820 |
or:[ object class hasImmediateInstances]) |
3608 | 2821 |
ifTrue:[ |
2822 |
acceptAction := nil. |
|
2823 |
] ifFalse:[ |
|
11511 | 2824 |
sel := self listEntryAt:idx. |
3608 | 2825 |
|
3868 | 2826 |
(sel startsWith:'-all') ifTrue:[ |
3608 | 2827 |
acceptAction := nil. |
2828 |
]. |
|
2829 |
(sel startsWith:'-hash') ifTrue:[ |
|
2830 |
acceptAction := nil. |
|
2831 |
]. |
|
11565 | 2832 |
(sel startsWith:'-basicSize') ifTrue:[ |
2833 |
acceptAction := nil. |
|
2834 |
]. |
|
2835 |
(sel startsWith:'-size') ifTrue:[ |
|
2836 |
acceptAction := nil. |
|
2837 |
]. |
|
3608 | 2838 |
(sel startsWith:'-identityHash') ifTrue:[ |
2839 |
acceptAction := nil. |
|
2840 |
]. |
|
3634 | 2841 |
(sel startsWith:'-dependents') ifTrue:[ |
2842 |
acceptAction := nil. |
|
2843 |
]. |
|
5134 | 2844 |
(sel startsWith:'-source') ifTrue:[ |
2845 |
acceptAction := nil. |
|
2846 |
]. |
|
3608 | 2847 |
]. |
2848 |
||
2849 |
workspace acceptAction:acceptAction. |
|
11511 | 2850 |
|
11565 | 2851 |
"Modified: / 06-06-2012 / 11:57:27 / cg" |
3608 | 2852 |
! |
2853 |
||
200 | 2854 |
setDoItAction |
542 | 2855 |
"set the codeViews doit action" |
2856 |
||
2857 |
workspace |
|
8908 | 2858 |
doItAction:[:theCode | |
2859 |
|evaluator| |
|
200 | 2860 |
|
9367 | 2861 |
(evaluator := object class evaluatorClass) |
8908 | 2862 |
notNil ifTrue:[ |
2863 |
evaluator |
|
2864 |
evaluate:theCode |
|
2865 |
in:nil |
|
9367 | 2866 |
receiver:object |
8908 | 2867 |
notifying:workspace |
2868 |
logged:true |
|
2869 |
ifFail:nil |
|
2870 |
] ifFalse:[ |
|
2871 |
'objects class provides no evaluator' |
|
2872 |
] |
|
2873 |
]. |
|
542 | 2874 |
|
9367 | 2875 |
object class evaluatorClass isNil ifTrue:[ |
8908 | 2876 |
workspace doItAction:nil. |
2877 |
workspace acceptAction:nil. |
|
1270
3dc841708edd
disable accept/doIt, if instances class provides no evaluator
Claus Gittinger <cg@exept.de>
parents:
1235
diff
changeset
|
2878 |
] |
3dc841708edd
disable accept/doIt, if instances class provides no evaluator
Claus Gittinger <cg@exept.de>
parents:
1235
diff
changeset
|
2879 |
|
3dc841708edd
disable accept/doIt, if instances class provides no evaluator
Claus Gittinger <cg@exept.de>
parents:
1235
diff
changeset
|
2880 |
"Modified: 1.8.1997 / 21:47:09 / cg" |
200 | 2881 |
! |
2882 |
||
3884 | 2883 |
showAllIndexedVarsInFieldList |
2884 |
^ true |
|
2885 |
! |
|
2886 |
||
9375
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2887 |
theSingleSelectionIndex |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2888 |
"helper - return the index of the (single) selected entry. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2889 |
Nil if nothing or multiple items are selected" |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2890 |
|
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2891 |
|idx| |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2892 |
|
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2893 |
idx := selectionIndex. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2894 |
idx isCollection ifTrue:[ |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2895 |
selectionIndex size == 1 ifTrue:[ |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2896 |
^ selectionIndex first |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2897 |
]. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2898 |
^ nil |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2899 |
]. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2900 |
^ selectionIndex |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2901 |
! |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
2902 |
|
200 | 2903 |
valueAtLine:lineNr |
2904 |
"helper - return the value of the selected entry" |
|
2905 |
||
6850 | 2906 |
|idx l val| |
200 | 2907 |
|
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
2908 |
(self hasSelfEntry |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2909 |
and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[ |
9367 | 2910 |
^ object |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2911 |
]. |
2235
ce49947e61f7
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
2912 |
|
11511 | 2913 |
((l := self listEntryAt:lineNr) startsWith:$-) ifTrue:[ |
5421
86a6077b131d
Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents:
5134
diff
changeset
|
2914 |
(l ~= '-' and:[(l at:2) isDigit not "negative number"]) ifTrue:[ |
11511 | 2915 |
^ self valueForSpecialLine:l |
3645 | 2916 |
]. |
3338 | 2917 |
]. |
2918 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2919 |
"/ a named instVar ? |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2920 |
idx := self instVarIndexForLine:lineNr. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2921 |
idx notNil ifTrue:[ |
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3428
diff
changeset
|
2922 |
BreakPointInterrupt catch:[ |
9367 | 2923 |
^ self namedFieldAt:idx |
2800 | 2924 |
] |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2925 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2926 |
|
6840 | 2927 |
"/ an extra named field ? |
2928 |
idx := self extraNamedVarIndexForLine:lineNr. |
|
2929 |
idx notNil ifTrue:[ |
|
2930 |
BreakPointInterrupt catch:[ |
|
6850 | 2931 |
val := ((self extraNamedFields) at:idx) value. |
2932 |
val isBlock ifTrue:[ val := val value ]. |
|
2933 |
^ val |
|
6840 | 2934 |
] |
2935 |
]. |
|
2936 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2937 |
"/ an indexed instVar ? |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2938 |
idx := self keyIndexForLine:lineNr. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2939 |
idx notNil ifTrue:[ |
3432
087493c18c74
class based exceptions - no longer need to send #breakPointSÃgnal
Claus Gittinger <cg@exept.de>
parents:
3428
diff
changeset
|
2940 |
BreakPointInterrupt catch:[ |
2800 | 2941 |
^ self indexedValueAtIndex:idx. |
2942 |
] |
|
200 | 2943 |
]. |
644
aab7d4f7c8c3
allow hiding self; added a label
Claus Gittinger <cg@exept.de>
parents:
621
diff
changeset
|
2944 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2945 |
"/ nope |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2946 |
^ nil |
613 | 2947 |
|
11511 | 2948 |
"Modified: / 16-05-2012 / 17:54:06 / cg" |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2949 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2950 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2951 |
valueAtLine:lineNr put:newValue |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2952 |
|idx| |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2953 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2954 |
idx := self instVarIndexForLine:selectionIndex. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2955 |
idx notNil ifTrue:[ |
9367 | 2956 |
self namedFieldAt:idx put:newValue. |
2957 |
^ self. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2235
diff
changeset
|
2958 |
]. |
9367 | 2959 |
|
2960 |
idx := self keyIndexForLine:selectionIndex. |
|
2961 |
idx notNil ifTrue:[ |
|
2962 |
self indexedValueAtIndex:idx put:newValue. |
|
2963 |
^ self |
|
2964 |
]. |
|
2965 |
||
2966 |
^ self "/ self selected - dont store |
|
3349 | 2967 |
! |
2968 |
||
2969 |
valueForSpecialLine:line |
|
11419
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2970 |
|idx fieldEntry extraAttributes fields| |
9367 | 2971 |
|
2972 |
extraAttributes := object inspectorExtraAttributes. |
|
8664
c6afed1e4bfa
changed #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
8653
diff
changeset
|
2973 |
(extraAttributes notNil and:[ extraAttributes includesKey:line ]) ifTrue:[ |
7297 | 2974 |
^ (extraAttributes at:line) value |
2975 |
]. |
|
6823 | 2976 |
|
11419
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2977 |
idx := self derivedFieldNames findFirst:[:l | l string = line string ]. |
6850 | 2978 |
idx ~~ 0 ifTrue:[ |
11419
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2979 |
"a lot of backward compatibility crab which has to go away..." |
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2980 |
fields := self derivedFields. |
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2981 |
(fields isKindOf:Dictionary) ifTrue:[ |
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2982 |
fieldEntry := fields associationAt:line string "idx". |
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2983 |
] ifFalse:[ |
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2984 |
fieldEntry := fields associationAt:idx. |
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2985 |
]. |
6850 | 2986 |
] ifFalse:[ |
2987 |
idx := self extraNamedFieldNames indexOf:line. |
|
2988 |
idx ~~ 0 ifTrue:[ |
|
2989 |
fieldEntry := self extraNamedFields at:idx. |
|
2990 |
]. |
|
6840 | 2991 |
]. |
6823 | 2992 |
fieldEntry notNil ifTrue:[ |
6850 | 2993 |
fieldEntry isAssociation ifTrue:[ |
11419
a96a34326a6a
changed: #valueForSpecialLine:
Claus Gittinger <cg@exept.de>
parents:
11276
diff
changeset
|
2994 |
^ fieldEntry value value |
6850 | 2995 |
]. |
2996 |
^ fieldEntry at:2. |
|
6823 | 2997 |
]. |
2998 |
||
3525 | 2999 |
(line startsWith:'-self') ifTrue:[ |
9367 | 3000 |
^ object |
3525 | 3001 |
]. |
11565 | 3002 |
(line startsWith:'-basicSize') ifTrue:[ |
3003 |
^ object basicSize |
|
3004 |
]. |
|
9504 | 3005 |
(line startsWith:'-size') ifTrue:[ |
3006 |
^ object size |
|
3007 |
]. |
|
3525 | 3008 |
(line startsWith:'-hash') ifTrue:[ |
9367 | 3009 |
^ object hash |
3525 | 3010 |
]. |
3011 |
(line startsWith:'-identityHash') ifTrue:[ |
|
9367 | 3012 |
^ object identityHash |
3525 | 3013 |
]. |
3634 | 3014 |
(line startsWith:'-dependents') ifTrue:[ |
9367 | 3015 |
^ object dependents |
3634 | 3016 |
]. |
3868 | 3017 |
(line startsWith:'-all') ifTrue:[ |
9367 | 3018 |
^ object |
3608 | 3019 |
]. |
8726 | 3020 |
(line startsWith:'-local messages') ifTrue:[ |
9367 | 3021 |
^ object |
8726 | 3022 |
]. |
3023 |
(line startsWith:'-inherited messages') ifTrue:[ |
|
9367 | 3024 |
^ object |
8726 | 3025 |
]. |
3026 |
(line startsWith:'-all messages') ifTrue:[ |
|
9367 | 3027 |
^ object |
8726 | 3028 |
]. |
3608 | 3029 |
|
3526 | 3030 |
self error:'unknown special line'. |
3349 | 3031 |
|
6823 | 3032 |
"Created: / 31-10-2001 / 09:17:45 / cg" |
11565 | 3033 |
"Modified: / 06-06-2012 / 11:57:54 / cg" |
200 | 3034 |
! ! |
3035 |
||
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3036 |
!InspectorView methodsFor:'queries'! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3037 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3038 |
canInspect:anObject |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3039 |
^ anObject inspectorClass == self class |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3040 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3041 |
|
5925 | 3042 |
compilerClass |
9367 | 3043 |
^ object class compilerClass |
5925 | 3044 |
! |
3045 |
||
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3046 |
dereferenceValueHolders |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3047 |
^ dereferenceValueHolders ? false |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3048 |
! |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3049 |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3050 |
labelFor:anObject |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3051 |
"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
|
3052 |
|
10321 | 3053 |
|lbl| |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3054 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3055 |
(self class == InspectorView |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3056 |
and:[anObject inspectorClass ~~ InspectorView]) ifTrue:[ |
6130 | 3057 |
lbl := 'BasicInspector on: ' |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3058 |
] ifFalse:[ |
6130 | 3059 |
lbl := 'Inspector on: ' |
5958 | 3060 |
]. |
10321 | 3061 |
^ (self class classResources string:lbl) |
3062 |
, (self class commonLabelFor:anObject) |
|
3063 |
||
3064 |
"Modified: / 15-07-2011 / 16:22:05 / cg" |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3065 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3066 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3067 |
labelNameFor:anObject |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3068 |
"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
|
3069 |
Simply returns the className or name of anObjects class" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3070 |
|
11658
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
3071 |
^ self class labelNameFor:anObject |
5958 | 3072 |
|
3073 |
" |
|
3074 |
1234 inspect |
|
3075 |
true inspect |
|
3076 |
$a inspect |
|
3077 |
" |
|
11658
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
3078 |
|
b431692d3cba
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
11644
diff
changeset
|
3079 |
"Modified: / 25-07-2012 / 10:15:06 / cg" |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3080 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3081 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3082 |
selectedKeyName |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3083 |
selectionIndex notNil ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3084 |
^ listView listAt:selectionIndex. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3085 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3086 |
^ nil |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3087 |
! |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3088 |
|
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3089 |
suppressPseudoSlots |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3090 |
^ suppressPseudoSlots ? false |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3091 |
! ! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3092 |
|
8653 | 3093 |
!InspectorView methodsFor:'selection'! |
3094 |
||
3095 |
selection:lineNr |
|
3096 |
self showSelection:lineNr |
|
3097 |
! |
|
3098 |
||
3099 |
showSelection:lineNr |
|
3100 |
"user clicked on an instvar - show value in workspace" |
|
3101 |
||
9672 | 3102 |
|listSize val| |
3103 |
||
3104 |
listSize := listView list size. |
|
3105 |
listSize == 0 ifTrue:[^ self]. |
|
3106 |
||
3107 |
(hasMore and:[lineNr == listSize]) ifTrue:[ |
|
8653 | 3108 |
"clicked on the '...' entry" |
3109 |
self showMore. |
|
3110 |
listView setSelection:lineNr. |
|
3111 |
]. |
|
3112 |
||
3113 |
self hasSelfEntry ifTrue:[ |
|
3114 |
(self hasSelfEntry and:[lineNr == 1]) ifTrue:[ |
|
3115 |
"selecting self also does a re-set, this allows updating the list" |
|
3116 |
self reinspect. |
|
3117 |
]. |
|
3118 |
]. |
|
10521
9218a2f4a6d1
Oops, fixes previous (messed) revision (changed: #showSelection:)
vrany
parents:
10520
diff
changeset
|
3119 |
selectionIndex := selectedLine := lineNr. |
8653 | 3120 |
val := self selection. |
3121 |
self showValue:val. |
|
3122 |
||
3123 |
self setAcceptAction. |
|
3124 |
||
3125 |
"Modified: / 03-08-2006 / 14:26:22 / cg" |
|
3126 |
! |
|
3127 |
||
3128 |
showValue:someValue |
|
3129 |
"user clicked on an entry - show value in workspace" |
|
3130 |
||
3131 |
|s| |
|
3132 |
||
9651 | 3133 |
self "topView" withWaitCursorDo:[ |
8653 | 3134 |
s := self displayStringForValue:someValue. |
3135 |
s = workspace selectionAsString ifFalse:[ |
|
3136 |
workspace replace:s. |
|
3137 |
]. |
|
3138 |
]. |
|
3139 |
||
9651 | 3140 |
"Modified: / 30-11-2010 / 18:56:55 / cg" |
8653 | 3141 |
! ! |
3142 |
||
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3143 |
!InspectorView methodsFor:'user interaction'! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3144 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3145 |
doAccept:theText |
11551 | 3146 |
|sel newValue fieldNameList| |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3147 |
|
11511 | 3148 |
sel := self listEntryAt:(self theSingleSelectionIndex). |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3149 |
(sel startsWith:'-all') ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3150 |
workspace flash. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3151 |
^ self. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3152 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3153 |
|
4642
ee63c37d9d3c
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
4314
diff
changeset
|
3154 |
Error handle:[:ex | |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3155 |
workspace flash |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3156 |
] do:[ |
9367 | 3157 |
newValue := object class evaluatorClass |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3158 |
evaluate:theText |
9367 | 3159 |
receiver:object |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3160 |
notifying:workspace. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3161 |
|
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3162 |
self dereferenceValueHolders ifTrue:[ |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3163 |
(self valueAtLine:selectionIndex) value:newValue |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3164 |
] ifFalse:[ |
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3884
diff
changeset
|
3165 |
self valueAtLine:selectionIndex put:newValue. |
11551 | 3166 |
]. |
3167 |
"/ update the fieldList... |
|
3168 |
fieldNameList := self fieldList. |
|
3169 |
hasMore ifTrue:[ |
|
3170 |
fieldNameList add:' ... ' |
|
3171 |
]. |
|
3172 |
listView contents:fieldNameList. |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3173 |
] |
11511 | 3174 |
|
11551 | 3175 |
"Modified: / 04-06-2012 / 18:16:29 / cg" |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3176 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3177 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3178 |
doCopyKey |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3179 |
"put the instVar-name into the text-copy-buffer" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3180 |
|
9378 | 3181 |
|nm selIdx| |
3182 |
||
3183 |
(selIdx := self theSingleSelectionIndex) notNil ifTrue:[ |
|
3184 |
nm := listView listAt:selIdx. |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3185 |
nm notNil ifTrue:[ |
6034 | 3186 |
self setClipboardText:(nm asString) |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3187 |
] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3188 |
] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3189 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3190 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3191 |
doInspect:basic |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3192 |
"user selected inspect-menu entry" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3193 |
|
10207
e2968eb0d08e
changed: #doInspect: to open instvars within same Inspector2 window
vrany
parents:
9794
diff
changeset
|
3194 |
|objectToInspect app | |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3195 |
|
11702 | 3196 |
objectToInspect := self selectedField. |
8025 | 3197 |
objectToInspect notNil ifTrue:[ |
9349
e6d367cbe86c
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
9316
diff
changeset
|
3198 |
(basic == #new and:[NewInspector::NewInspectorView notNil]) ifTrue:[ |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3199 |
NewInspector::NewInspectorView inspect:objectToInspect |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3200 |
] ifFalse:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3201 |
basic ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3202 |
objectToInspect basicInspect |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3203 |
] ifFalse:[ |
10424
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3204 |
"/ cg: a bad hack; it is ok for a double-click, but not for the |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3205 |
"/ menu item (i often want to have another inspector on the same object) |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3206 |
"/ for the menu: add an extra follow/diveIn or whatever entry, if desired |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3207 |
"/ "HACK" |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3208 |
"/ app := (self topView perform:#application ifNotUnderstood: [nil]). |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3209 |
"/ (app notNil and:[app isKindOf: Tools::Inspector2]) ifTrue:[ |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3210 |
"/ app inspect: objectToInspect |
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3211 |
"/ ] ifFalse:[ |
10207
e2968eb0d08e
changed: #doInspect: to open instvars within same Inspector2 window
vrany
parents:
9794
diff
changeset
|
3212 |
objectToInspect inspect |
10424
9d7d0c28f504
only follow (dive in) with double click;
Claus Gittinger <cg@exept.de>
parents:
10321
diff
changeset
|
3213 |
"/ ] |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3214 |
] |
8025 | 3215 |
]. |
3216 |
]. |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3217 |
|
10207
e2968eb0d08e
changed: #doInspect: to open instvars within same Inspector2 window
vrany
parents:
9794
diff
changeset
|
3218 |
"Modified: / 06-07-2011 / 15:58:55 / jv" |
11702 | 3219 |
"Modified: / 27-07-2012 / 22:43:11 / cg" |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3220 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3221 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3222 |
doUpdate |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3223 |
self reinspect |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3224 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3225 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3226 |
monitor:anInstVarName |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3227 |
"start a monitoring process, showing the given instVar |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3228 |
in regular intervals." |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3229 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3230 |
|ivName| |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3231 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3232 |
(ivName := anInstVarName) isInteger ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3233 |
ivName := anInstVarName printString |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3234 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3235 |
listView selectElement:ivName. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3236 |
self doStartMonitor |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3237 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3238 |
"Created: / 1.3.1996 / 19:31:45 / cg" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3239 |
"Modified: / 12.2.1999 / 16:05:47 / cg" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3240 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3241 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3242 |
selection |
9375
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3243 |
"helper - return the value of the (single) selected entry. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3244 |
Nil if nothing or multiple items are selected" |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3245 |
|
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3246 |
|idx val| |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3247 |
|
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3248 |
idx := self theSingleSelectionIndex. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3249 |
idx isNil ifTrue:[^ nil]. |
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3250 |
|
f885ea13e694
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9370
diff
changeset
|
3251 |
val := self valueAtLine:idx. |
6850 | 3252 |
self dereferenceValueHolders ifTrue:[ |
3253 |
"workspace-variable-inspection" |
|
3254 |
val := val value |
|
3255 |
]. |
|
3256 |
^ val |
|
3257 |
||
3258 |
"Modified: / 03-08-2006 / 14:27:02 / cg" |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3259 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3260 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3261 |
showLast |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3262 |
"user clicked on an instvar - show value in workspace" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3263 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3264 |
|lastIdx| |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3265 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3266 |
lastIdx := listView list size. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3267 |
lastIdx ~~ 0 ifTrue:[ |
8908 | 3268 |
self showSelection:lastIdx. |
3269 |
listView selection:lastIdx. |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3270 |
] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3271 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3272 |
"Created: 28.6.1996 / 15:06:38 / cg" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3273 |
"Modified: 18.3.1997 / 18:22:54 / cg" |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3274 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3275 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3276 |
tryToSelectKeyNamed:aString |
11599
06b7c6cce561
changed: #tryToSelectKeyNamed:
Claus Gittinger <cg@exept.de>
parents:
11594
diff
changeset
|
3277 |
|list idx aStringWithSpace| |
06b7c6cce561
changed: #tryToSelectKeyNamed:
Claus Gittinger <cg@exept.de>
parents:
11594
diff
changeset
|
3278 |
|
06b7c6cce561
changed: #tryToSelectKeyNamed:
Claus Gittinger <cg@exept.de>
parents:
11594
diff
changeset
|
3279 |
aString isEmptyOrNil ifTrue:[^ self]. |
06b7c6cce561
changed: #tryToSelectKeyNamed:
Claus Gittinger <cg@exept.de>
parents:
11594
diff
changeset
|
3280 |
|
11603
6f7540a1e057
changed: #tryToSelectKeyNamed:
Claus Gittinger <cg@exept.de>
parents:
11599
diff
changeset
|
3281 |
aStringWithSpace := aString string,' '. |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3282 |
|
5558 | 3283 |
list := listView list. |
3284 |
list notNil ifTrue:[ |
|
11603
6f7540a1e057
changed: #tryToSelectKeyNamed:
Claus Gittinger <cg@exept.de>
parents:
11599
diff
changeset
|
3285 |
(idx := list findFirst:[:line | line = aString or:[line string startsWith:aStringWithSpace]]) ~= 0 ifTrue:[ |
5558 | 3286 |
listView selection:idx |
3287 |
]. |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3288 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3289 |
|
11599
06b7c6cce561
changed: #tryToSelectKeyNamed:
Claus Gittinger <cg@exept.de>
parents:
11594
diff
changeset
|
3290 |
"Created: / 16-11-2001 / 13:48:51 / cg" |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3291 |
! ! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3869
diff
changeset
|
3292 |
|
4268
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3293 |
!InspectorView methodsFor:'workspace protocol'! |
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3294 |
|
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3295 |
modified:aBoolean |
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3296 |
^ workspace modified:aBoolean |
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3297 |
! |
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3298 |
|
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3299 |
saveAs:file doAppend:doAppend |
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3300 |
workspace saveAs:file doAppend:doAppend |
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3301 |
! ! |
0fe3e4a82ddf
more textView protocol (for Workspace)
Claus Gittinger <cg@exept.de>
parents:
4197
diff
changeset
|
3302 |
|
871 | 3303 |
!InspectorView class methodsFor:'documentation'! |
200 | 3304 |
|
10521
9218a2f4a6d1
Oops, fixes previous (messed) revision (changed: #showSelection:)
vrany
parents:
10520
diff
changeset
|
3305 |
version |
11748
880356e33f08
changed: #listEntryForName:value:
Claus Gittinger <cg@exept.de>
parents:
11715
diff
changeset
|
3306 |
^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.275 2012-08-14 08:49:39 cg Exp $' |
10521
9218a2f4a6d1
Oops, fixes previous (messed) revision (changed: #showSelection:)
vrany
parents:
10520
diff
changeset
|
3307 |
! |
9218a2f4a6d1
Oops, fixes previous (messed) revision (changed: #showSelection:)
vrany
parents:
10520
diff
changeset
|
3308 |
|
8868
1fd94adeda59
changed: #setInitialSelection
Claus Gittinger <cg@exept.de>
parents:
8800
diff
changeset
|
3309 |
version_CVS |
11748
880356e33f08
changed: #listEntryForName:value:
Claus Gittinger <cg@exept.de>
parents:
11715
diff
changeset
|
3310 |
^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.275 2012-08-14 08:49:39 cg Exp $' |
200 | 3311 |
! ! |