author | Stefan Vogel <sv@exept.de> |
Mon, 12 Jan 2004 14:46:46 +0100 | |
changeset 5421 | 86a6077b131d |
parent 4269 | b5d1e481db7a |
child 6942 | 37014f19dafb |
permissions | -rw-r--r-- |
36 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
52 | 3 |
All Rights Reserved |
36 | 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 |
" |
|
12 |
||
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2647
diff
changeset
|
13 |
"{ Package: 'stx:libtool' }" |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2647
diff
changeset
|
14 |
|
36 | 15 |
InspectorView subclass:#DictionaryInspectorView |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
16 |
instanceVariableNames:'keys hideClassVars hideClasses hideAliases' |
361
d1c82e7aa149
handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
17 |
classVariableNames:'' |
d1c82e7aa149
handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
18 |
poolDictionaries:'' |
d1c82e7aa149
handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
19 |
category:'Interface-Inspector' |
36 | 20 |
! |
21 |
||
957
ecbcb2c15ae8
show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents:
689
diff
changeset
|
22 |
!DictionaryInspectorView class methodsFor:'documentation'! |
36 | 23 |
|
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
52 | 27 |
All Rights Reserved |
36 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
a modified Inspector for Dictionaries |
|
510 | 41 |
|
42 |
[author:] |
|
43 |
Claus Gittinger |
|
36 | 44 |
" |
45 |
! ! |
|
46 |
||
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
47 |
!DictionaryInspectorView methodsFor:'menu'! |
36 | 48 |
|
73 | 49 |
fieldMenu |
1361 | 50 |
<resource: #programMenu > |
51 |
||
4269 | 52 |
|items m| |
36 | 53 |
|
2645
d01d467c5199
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
2298
diff
changeset
|
54 |
inspectedObject isNameSpace ifTrue:[ |
1665 | 55 |
items := #( |
3198 | 56 |
('Copy Key' doCopyKey ) |
57 |
('-') |
|
58 |
('Inspect' doInspect ) |
|
59 |
('Inspect Key' doInspectKey ) |
|
60 |
('BasicInspect' doBasicInspect ) |
|
61 |
('Inspect Hierarchical' doNewInspect ) |
|
2085 | 62 |
('-') |
3198 | 63 |
('Ref chains' showReferences ) |
4269 | 64 |
('References to Global' showKeyReferences ) |
2085 | 65 |
('-') |
3198 | 66 |
('Browse' browse ) |
2085 | 67 |
('-') |
3198 | 68 |
('Add Key' doAddKey ) |
69 |
('Remove Key' doRemoveKey ) |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
70 |
('-') |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
71 |
). |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
72 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
73 |
hideClassVars == true ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
74 |
items := items , #( |
3198 | 75 |
('Show classVars' doShowClassVars ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
76 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
77 |
] ifFalse:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
78 |
items := items , #( |
3198 | 79 |
('Hide classVars' doHideClassVars ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
80 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
81 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
82 |
hideClasses == true ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
83 |
items := items , #( |
3198 | 84 |
('Show classes' doShowClasses ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
85 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
86 |
] ifFalse:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
87 |
items := items , #( |
3198 | 88 |
('Hide classes' doHideClasses ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
89 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
90 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
91 |
hideAliases == true ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
92 |
items := items , #( |
3198 | 93 |
('Show aliases' doShowAliases ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
94 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
95 |
] ifFalse:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
96 |
items := items , #( |
3198 | 97 |
('Hide aliases' doHideAliases ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
98 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
99 |
] |
45 | 100 |
] ifFalse:[ |
1665 | 101 |
items := #( |
3198 | 102 |
('Copy Key' doCopyKey ) |
103 |
('-') |
|
104 |
('Inspect' doInspect ) |
|
105 |
('Inspect Key' doInspectKey ) |
|
106 |
('BasicInspect' doBasicInspect ) |
|
107 |
('Inspect Hierarchical' doNewInspect ) |
|
2085 | 108 |
('-') |
3198 | 109 |
('Ref chains' showReferences ) |
2085 | 110 |
('-') |
3198 | 111 |
('Browse' browse ) |
112 |
('Browse class hierarchy' browseClassHierarchy ) |
|
113 |
('Browse full class protocol' browseFullClassProtocol) |
|
2085 | 114 |
('-') |
3198 | 115 |
('Add Key' doAddKey ) |
116 |
('Remove Key' doRemoveKey ) |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
117 |
). |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
118 |
]. |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
119 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
120 |
monitorProcess isNil ifTrue:[ |
1665 | 121 |
items := items , #( |
2085 | 122 |
('-') |
3198 | 123 |
('Start Monitor' doStartMonitor ) |
1665 | 124 |
). |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
125 |
] ifFalse:[ |
1665 | 126 |
items := items , #( |
2085 | 127 |
('-') |
3198 | 128 |
('Stop Monitor' doStopMonitor ) |
1665 | 129 |
). |
45 | 130 |
]. |
131 |
||
3198 | 132 |
items := items , #( |
133 |
('-') |
|
134 |
('Update' doUpdate ) |
|
135 |
). |
|
136 |
||
1665 | 137 |
m := PopUpMenu itemList:items resources:resources. |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
138 |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2215
diff
changeset
|
139 |
selectionIndex isNil ifTrue:[ |
1665 | 140 |
m disableAll:#(doInspect doInspectKey doBasicInspect doNewInspect |
2085 | 141 |
doRemoveKey doStartMonitor doStopMonitor doCopyKey |
1665 | 142 |
) |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
143 |
] ifFalse:[ |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2215
diff
changeset
|
144 |
(self keyIndexForLine:selectionIndex) isNil ifTrue:[ |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
145 |
m disableAll:#(doInspectKey doRemoveKey doCopyKey) |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
146 |
] |
1665 | 147 |
]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
148 |
|
1665 | 149 |
^ m. |
150 |
||
151 |
"Modified: / 21.5.1998 / 13:25:10 / cg" |
|
36 | 152 |
! ! |
200 | 153 |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
154 |
!DictionaryInspectorView methodsFor:'menu actions'! |
200 | 155 |
|
3198 | 156 |
browse |
157 |
|cls| |
|
158 |
||
159 |
cls := self selection class theNonMetaclass. |
|
160 |
"/ cls isNameSpace ifTrue:[ |
|
161 |
"/ self halt. |
|
162 |
"/ ]. |
|
163 |
cls browserClass openInClass:cls selector:nil |
|
164 |
! |
|
165 |
||
200 | 166 |
doAddKey |
167 |
"add a key" |
|
168 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
169 |
|keyName key val l| |
200 | 170 |
|
3198 | 171 |
keyName := Dialog request:'Key to add (storeString):' initialAnswer:''. |
200 | 172 |
keyName notEmpty ifTrue:[ |
3198 | 173 |
key := Object readFrom:keyName onError:[ self information:'Bad input.'. ^ self]. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
174 |
(inspectedObject includesKey:key) ifFalse:[ |
3198 | 175 |
val := Dialog request:'Value to add (storeString):' initialAnswer:''. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
176 |
val notNil ifTrue:[ |
3198 | 177 |
val := Object readFrom:val onError:[ self information:'Bad input.'. ^ self]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
178 |
]. |
3198 | 179 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
180 |
inspectedObject at:key put:val. |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2215
diff
changeset
|
181 |
selectionIndex := selectedLine := nil. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
182 |
inspectedObject changed. |
2213
d6e6c41db3ef
keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents:
2212
diff
changeset
|
183 |
l := listView firstLineShown. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
184 |
self reinspect. "force list update" |
2213
d6e6c41db3ef
keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents:
2212
diff
changeset
|
185 |
listView scrollToLine:l |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
186 |
] |
200 | 187 |
] |
188 |
! |
|
189 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
190 |
doHideAliases |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
191 |
hideAliases := true. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
192 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
193 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
194 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
195 |
doHideClassVars |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
196 |
hideClassVars := true. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
197 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
198 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
199 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
200 |
doHideClasses |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
201 |
hideClasses := true. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
202 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
203 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
204 |
|
200 | 205 |
doInspectKey |
206 |
"inspect selected items key" |
|
207 |
||
4269 | 208 |
|key| |
200 | 209 |
|
4269 | 210 |
key := self selectedKey. |
211 |
key notNil ifTrue:[ |
|
212 |
key inspect |
|
213 |
] |
|
200 | 214 |
! |
215 |
||
216 |
doRemoveKey |
|
217 |
"remove selected item from keys" |
|
218 |
||
4269 | 219 |
|key l| |
200 | 220 |
|
4269 | 221 |
key := self selectedKey. |
222 |
key notNil ifTrue:[ |
|
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
223 |
(inspectedObject includesKey:key) ifTrue:[ |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
224 |
listView cursor:(Cursor wait). |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
225 |
inspectedObject removeKey:key. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
226 |
keys := nil. |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2215
diff
changeset
|
227 |
selectionIndex := selectedLine := nil. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
228 |
inspectedObject changed. |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
229 |
listView cursor:(Cursor hand). |
2212
10903bf15c4b
keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
230 |
l := listView firstLineShown. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
231 |
self reinspect. "force list update" |
2212
10903bf15c4b
keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents:
2193
diff
changeset
|
232 |
listView scrollToLine:l. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
233 |
]. |
200 | 234 |
] |
1740 | 235 |
! |
236 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
237 |
doShowAliases |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
238 |
hideAliases := false. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
239 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
240 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
241 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
242 |
doShowClassVars |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
243 |
hideClassVars := false. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
244 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
245 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
246 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
247 |
doShowClasses |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
248 |
hideClasses := false. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
249 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
250 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
251 |
|
1740 | 252 |
showKeyReferences |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
253 |
"show users of selected key (i.e. global). |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
254 |
Only useful when inspecting smalltalk" |
1740 | 255 |
|
4269 | 256 |
|key| |
1740 | 257 |
|
4269 | 258 |
key := self selectedKey. |
259 |
key notNil ifTrue:[ |
|
2274 | 260 |
self topView withWaitCursorDo:[ |
4269 | 261 |
UserPreferences systemBrowserClass browseReferendsOf:(key asSymbol) |
1740 | 262 |
]. |
263 |
] |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
264 |
! ! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
265 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
266 |
!DictionaryInspectorView methodsFor:'private'! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
267 |
|
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
268 |
baseInspectedObjectClass |
2297
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
269 |
|
2298 | 270 |
(inspectedObject isMemberOf:Dictionary) ifFalse:[ |
271 |
(inspectedObject class inheritsFrom:Dictionary) ifFalse:[ |
|
272 |
"this is true for e.g. MethodDictionary" |
|
273 |
^ Object |
|
274 |
] |
|
2297
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
275 |
]. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
276 |
^ Dictionary |
2297
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
277 |
|
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
278 |
"Modified: / 23.7.1999 / 10:39:11 / stefan" |
2298 | 279 |
|
280 |
||
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
281 |
! |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
282 |
|
649 | 283 |
defaultLabel |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3874
diff
changeset
|
284 |
^ 'Keys' |
649 | 285 |
|
286 |
"Created: 28.6.1996 / 19:46:51 / cg" |
|
287 |
! |
|
288 |
||
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
289 |
indexList |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
290 |
"return a list of indexes to show in the selectionList. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
291 |
Set hasMore to true, if a '...' entry should be added." |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
292 |
|
2645
d01d467c5199
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
2298
diff
changeset
|
293 |
inspectedObject isNameSpace ifTrue:[ |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
294 |
^ self indexListForNameSpace. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
295 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
296 |
|
2647
888a03260cf0
be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents:
2645
diff
changeset
|
297 |
"/ do not use 'inspectedObjectkeys', |
888a03260cf0
be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents:
2645
diff
changeset
|
298 |
"/ since Sets cannot hold nils (which are now valid keys) |
888a03260cf0
be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents:
2645
diff
changeset
|
299 |
keys := OrderedCollection new. |
888a03260cf0
be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents:
2645
diff
changeset
|
300 |
inspectedObject keysDo:[:k | keys add:k]. |
888a03260cf0
be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents:
2645
diff
changeset
|
301 |
keys := keys asSortedCollection:[:a :b | a displayString < b displayString]. |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
302 |
^ keys |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
303 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
304 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
305 |
indexListForNameSpace |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
306 |
"return a list of indexes to show in the selectionList. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
307 |
Set hasMore to true, if a '...' entry should be added." |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
308 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
309 |
keys := SortedCollection new:1000. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
310 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
311 |
(hideClassVars or:[hideClasses or:[hideAliases]]) ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
312 |
inspectedObject keysDo:[:k | |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
313 |
|hidden i o| |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
314 |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
315 |
hidden := false. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
316 |
hideClassVars == true ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
317 |
(i := k lastIndexOf:$:) ~~ 0 ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
318 |
(i > 1 and:[(k at:i-1) ~~ $:]) ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
319 |
hidden := true |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
320 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
321 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
322 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
323 |
(hidden not and:[hideClasses == true]) ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
324 |
o := inspectedObject at:k ifAbsent:nil. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
325 |
o isBehavior ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
326 |
inspectedObject == Smalltalk ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
327 |
o name == k ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
328 |
hidden := true |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
329 |
] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
330 |
] ifFalse:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
331 |
o nameWithoutNameSpacePrefix = k ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
332 |
hidden := true |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
333 |
] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
334 |
] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
335 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
336 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
337 |
(hidden not and:[hideAliases == true]) ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
338 |
o := inspectedObject at:k ifAbsent:nil. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
339 |
o isBehavior ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
340 |
inspectedObject == Smalltalk ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
341 |
o name ~~ k ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
342 |
hidden := true |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
343 |
] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
344 |
] ifFalse:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
345 |
o nameWithoutNameSpacePrefix ~= k ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
346 |
hidden := true |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
347 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
348 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
349 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
350 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
351 |
hidden ifFalse:[keys add:k] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
352 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
353 |
] ifFalse:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
354 |
inspectedObject keysDo:[:k | keys add:k]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
355 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
356 |
^ keys |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
357 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
358 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
359 |
indexedFieldList |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
360 |
"return a list of indexed-variable names to show in the selectionList. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
361 |
Set hasMore to true, if a '...' entry should be added." |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
362 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
363 |
|keys| |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
364 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
365 |
keys := self indexList. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
366 |
^ keys |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
367 |
collect:[:k | |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
368 |
k isSymbol |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
369 |
ifTrue:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
370 |
k printString] |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
371 |
ifFalse:[ |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
372 |
k displayString]]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
373 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
374 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
375 |
instVarIndexForLine:lineNr |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
376 |
"helper - return the index for a named instVar; |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
377 |
nil, if self or a keyed instvar is selected." |
2189
db73912a0b4c
show named instvars (except those of Dictionary)
Claus Gittinger <cg@exept.de>
parents:
2085
diff
changeset
|
378 |
|
2645
d01d467c5199
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
2298
diff
changeset
|
379 |
inspectedObject isNameSpace ifTrue:[ |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
380 |
^ nil |
957
ecbcb2c15ae8
show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents:
689
diff
changeset
|
381 |
]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
382 |
^ super instVarIndexForLine:lineNr |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
383 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
384 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
385 |
keyIndexForLine:lineNr |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
386 |
"helper - return the index of the key-list" |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
387 |
|
5421
86a6077b131d
Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents:
4269
diff
changeset
|
388 |
|firstRealIndex idx line| |
4100 | 389 |
|
2645
d01d467c5199
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
2298
diff
changeset
|
390 |
inspectedObject isNameSpace ifTrue:[ |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3874
diff
changeset
|
391 |
(self hasSelfEntry |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
392 |
and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
393 |
^ nil "/ self selected |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
394 |
]. |
4100 | 395 |
firstRealIndex := 1. |
396 |
idx := lineNr. |
|
5421
86a6077b131d
Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents:
4269
diff
changeset
|
397 |
[line := listView at:firstRealIndex. |
86a6077b131d
Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents:
4269
diff
changeset
|
398 |
(line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[ |
4100 | 399 |
firstRealIndex := firstRealIndex + 1. |
400 |
idx := idx - 1. |
|
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3874
diff
changeset
|
401 |
]. |
4100 | 402 |
|
403 |
^ idx |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
404 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
405 |
^ super keyIndexForLine:lineNr |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
406 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
407 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
408 |
namedFieldList |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
409 |
"return a list of instVar names to show in the selectionList." |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
410 |
|
2645
d01d467c5199
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
2298
diff
changeset
|
411 |
inspectedObject isNameSpace ifTrue:[ |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
412 |
"/ empty ... |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
413 |
^ OrderedCollection new |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
414 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
415 |
^ super namedFieldList |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
416 |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
417 |
! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
418 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
419 |
release |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
420 |
"release inspected object" |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
421 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
422 |
keys := nil. |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
423 |
super release |
4269 | 424 |
! |
425 |
||
426 |
selectedKey |
|
427 |
"selected items key or nil" |
|
428 |
||
429 |
|idx| |
|
430 |
||
431 |
idx := self keyIndexForLine:selectionIndex. |
|
432 |
idx notNil ifTrue:[ |
|
433 |
^ (keys at:idx) |
|
434 |
]. |
|
435 |
^ nil. |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
436 |
! ! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
437 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
438 |
!DictionaryInspectorView methodsFor:'user interaction'! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
439 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
440 |
indexedValueAtIndex:idx |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
441 |
|key| |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
442 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
443 |
key := keys at:idx. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
444 |
^ inspectedObject at:key ifAbsent:nil. |
2190
12158a4f0d9c
care for last change when accepting
Claus Gittinger <cg@exept.de>
parents:
2189
diff
changeset
|
445 |
|
200 | 446 |
! |
447 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
448 |
indexedValueAtIndex:idx put:newValue |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
449 |
|key| |
200 | 450 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
451 |
key := keys at:idx. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
452 |
inspectedObject at:key put:newValue. |
200 | 453 |
! ! |
454 |
||
957
ecbcb2c15ae8
show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents:
689
diff
changeset
|
455 |
!DictionaryInspectorView class methodsFor:'documentation'! |
200 | 456 |
|
457 |
version |
|
5421
86a6077b131d
Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents:
4269
diff
changeset
|
458 |
^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.56 2004-01-12 13:45:55 stefan Exp $' |
200 | 459 |
! ! |