author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 25 Jul 2014 10:49:38 +0200 | |
changeset 14678 | 079d9fc7384d |
parent 14261 | 89fca378e089 |
child 14951 | c620388aa2e2 |
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 |
" |
|
2697
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2647
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
b4f4e431b71e
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
2647
diff
changeset
|
13 |
|
36 | 14 |
InspectorView subclass:#DictionaryInspectorView |
8403 | 15 |
instanceVariableNames:'keys hideClassVars hideClasses hideUnloadedClasses hideAliases |
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
16 |
hideNilValues hideLiteralValues hideColorsAndImages |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
17 |
hideSignalInstances' |
361
d1c82e7aa149
handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
18 |
classVariableNames:'' |
d1c82e7aa149
handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
19 |
poolDictionaries:'' |
d1c82e7aa149
handle nil inspectedObjects (mhmh)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
20 |
category:'Interface-Inspector' |
36 | 21 |
! |
22 |
||
957
ecbcb2c15ae8
show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents:
689
diff
changeset
|
23 |
!DictionaryInspectorView class methodsFor:'documentation'! |
36 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
52 | 28 |
All Rights Reserved |
36 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
a modified Inspector for Dictionaries |
|
510 | 42 |
|
43 |
[author:] |
|
44 |
Claus Gittinger |
|
36 | 45 |
" |
46 |
! ! |
|
47 |
||
8024
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
48 |
!DictionaryInspectorView methodsFor:'event handling'! |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
49 |
|
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
50 |
keyPress:key x:x y:y |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
51 |
"handle special keys" |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
52 |
|
12111
0da8cd378b6f
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
11815
diff
changeset
|
53 |
<resource: #keyboard (#Delete #BackSpace #Insert)> |
8024
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
54 |
|
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
55 |
(key == #Delete or:[key == #BackSpace]) ifTrue:[ |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
56 |
self doRemoveKey. |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
57 |
^ self. |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
58 |
]. |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
59 |
(key == #Insert) ifTrue:[ |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
60 |
self doAddKey. |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
61 |
^ self. |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
62 |
]. |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
63 |
|
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
64 |
super keyPress:key x:x y:y |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
65 |
! ! |
2eec1213d292
Handle keys: Delete, Backspace, Insert
Stefan Vogel <sv@exept.de>
parents:
7946
diff
changeset
|
66 |
|
8403 | 67 |
!DictionaryInspectorView methodsFor:'initialization & release'! |
68 |
||
69 |
initialize |
|
70 |
super initialize. |
|
71 |
||
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
72 |
listView multipleSelectOk:true. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
73 |
|
8403 | 74 |
hideClassVars := false. |
75 |
hideClasses := false. |
|
76 |
hideUnloadedClasses := false. |
|
77 |
hideAliases := false. |
|
78 |
hideLiteralValues := false. |
|
79 |
hideNilValues := false. |
|
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
80 |
hideColorsAndImages := false. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
81 |
hideSignalInstances := false. |
8403 | 82 |
! ! |
83 |
||
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
84 |
!DictionaryInspectorView methodsFor:'menu'! |
36 | 85 |
|
73 | 86 |
fieldMenu |
1361 | 87 |
<resource: #programMenu > |
88 |
||
9379 | 89 |
|items m selIdx| |
36 | 90 |
|
2645
d01d467c5199
#isNamespace renamed to #isNameSpace
Claus Gittinger <cg@exept.de>
parents:
2298
diff
changeset
|
91 |
inspectedObject isNameSpace ifTrue:[ |
1665 | 92 |
items := #( |
3198 | 93 |
('Copy Key' doCopyKey ) |
94 |
('-') |
|
95 |
('Inspect' doInspect ) |
|
96 |
('Inspect Key' doInspectKey ) |
|
97 |
('BasicInspect' doBasicInspect ) |
|
9350
c94c232ef91e
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
8973
diff
changeset
|
98 |
). |
c94c232ef91e
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
8973
diff
changeset
|
99 |
NewInspector::NewInspectorView notNil ifTrue:[ |
c94c232ef91e
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
8973
diff
changeset
|
100 |
items := items , #( |
c94c232ef91e
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
8973
diff
changeset
|
101 |
('Inspect Hierarchical' #doNewInspect ) |
c94c232ef91e
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
8973
diff
changeset
|
102 |
). |
c94c232ef91e
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
8973
diff
changeset
|
103 |
]. |
c94c232ef91e
do not show new-inspector in menu, if there is none loaded
Claus Gittinger <cg@exept.de>
parents:
8973
diff
changeset
|
104 |
items := items , #( |
2085 | 105 |
('-') |
7946 | 106 |
('Owners' showOwners ) |
7805 | 107 |
('Ref Chains' showReferences ) |
4269 | 108 |
('References to Global' showKeyReferences ) |
2085 | 109 |
('-') |
3198 | 110 |
('Browse' browse ) |
2085 | 111 |
('-') |
9502
49a0c6fc64b4
comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents:
9379
diff
changeset
|
112 |
('Add Key...' doAddKey ) |
3198 | 113 |
('Remove Key' doRemoveKey ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
114 |
('-') |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
115 |
). |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
116 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
117 |
hideClassVars == true ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
118 |
items := items , #( |
7805 | 119 |
('Show ClassVars' doShowClassVars ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
120 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
121 |
] ifFalse:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
122 |
items := items , #( |
7805 | 123 |
('Hide ClassVars' doHideClassVars ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
124 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
125 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
126 |
hideClasses == true ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
127 |
items := items , #( |
7805 | 128 |
('Show Classes' doShowClasses ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
129 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
130 |
] ifFalse:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
131 |
items := items , #( |
7805 | 132 |
('Hide Classes' doHideClasses ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
133 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
134 |
]. |
8403 | 135 |
hideUnloadedClasses == true ifTrue:[ |
136 |
items := items , #( |
|
137 |
('Show Unloaded Classes' doShowUnloadedClasses ) |
|
138 |
). |
|
139 |
] ifFalse:[ |
|
140 |
items := items , #( |
|
141 |
('Hide UnloadedClasses' doHideUnloadedClasses ) |
|
142 |
). |
|
143 |
]. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
144 |
hideAliases == true ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
145 |
items := items , #( |
7805 | 146 |
('Show Aliases' doShowAliases ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
147 |
). |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
148 |
] ifFalse:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
149 |
items := items , #( |
7805 | 150 |
('Hide Aliases' doHideAliases ) |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
151 |
). |
7946 | 152 |
]. |
153 |
hideLiteralValues == true ifTrue:[ |
|
154 |
items := items , #( |
|
155 |
('Show Literal Values' doShowLiteralValues ) |
|
156 |
). |
|
157 |
] ifFalse:[ |
|
158 |
items := items , #( |
|
159 |
('Hide Literal Values' doHideLiteralValues ) |
|
160 |
). |
|
161 |
]. |
|
162 |
hideNilValues == true ifTrue:[ |
|
163 |
items := items , #( |
|
164 |
('Show Nil Values' doShowNilValues ) |
|
165 |
). |
|
166 |
] ifFalse:[ |
|
167 |
items := items , #( |
|
168 |
('Hide Nil Values' doHideNilValues ) |
|
169 |
). |
|
170 |
]. |
|
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
171 |
hideColorsAndImages == true ifTrue:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
172 |
items := items , #( |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
173 |
('Show Colors and Images' doShowColorsAndImages ) |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
174 |
). |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
175 |
] ifFalse:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
176 |
items := items , #( |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
177 |
('Hide Colors and Images' doHideColorsAndImages ) |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
178 |
). |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
179 |
]. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
180 |
hideSignalInstances == true ifTrue:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
181 |
items := items , #( |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
182 |
('Show Signals' doShowSignalInstances ) |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
183 |
). |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
184 |
] ifFalse:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
185 |
items := items , #( |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
186 |
('Hide Signals' doHideSignalInstances ) |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
187 |
). |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
188 |
]. |
45 | 189 |
] ifFalse:[ |
1665 | 190 |
items := #( |
3198 | 191 |
('Copy Key' doCopyKey ) |
192 |
('-') |
|
193 |
('Inspect' doInspect ) |
|
194 |
('Inspect Key' doInspectKey ) |
|
195 |
('BasicInspect' doBasicInspect ) |
|
196 |
('Inspect Hierarchical' doNewInspect ) |
|
2085 | 197 |
('-') |
7946 | 198 |
('Owners' showOwners ) |
7805 | 199 |
('Ref Chains' showReferences ) |
12598
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
200 |
('Ref Chains to Key' showReferencesToKey ) |
2085 | 201 |
('-') |
3198 | 202 |
('Browse' browse ) |
7805 | 203 |
('Browse Class Hierarchy' browseClassHierarchy ) |
204 |
('Browse Full Class Protocol' browseFullClassProtocol) |
|
2085 | 205 |
('-') |
9502
49a0c6fc64b4
comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents:
9379
diff
changeset
|
206 |
('Add Key...' doAddKey ) |
3198 | 207 |
('Remove Key' doRemoveKey ) |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
208 |
). |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
209 |
]. |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
210 |
|
12834 | 211 |
(hasMore) ifTrue:[ |
212 |
items := items , #( |
|
213 |
('-') |
|
214 |
('Show More' showMore ) |
|
215 |
). |
|
216 |
(inspectedObject size > (nShown * 2)) ifTrue:[ |
|
217 |
items := items , #( |
|
218 |
('Show All' #showAll ) |
|
219 |
) |
|
220 |
]. |
|
221 |
]. |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
222 |
monitorProcess isNil ifTrue:[ |
1665 | 223 |
items := items , #( |
2085 | 224 |
('-') |
3198 | 225 |
('Start Monitor' doStartMonitor ) |
1665 | 226 |
). |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
227 |
] ifFalse:[ |
1665 | 228 |
items := items , #( |
2085 | 229 |
('-') |
3198 | 230 |
('Stop Monitor' doStopMonitor ) |
1665 | 231 |
). |
45 | 232 |
]. |
233 |
||
11815 | 234 |
items := items , (self sortOrderItems). |
3198 | 235 |
items := items , #( |
236 |
('-') |
|
237 |
('Update' doUpdate ) |
|
238 |
). |
|
239 |
||
1665 | 240 |
m := PopUpMenu itemList:items resources:resources. |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
241 |
|
7942
fce54ed1ef8b
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7805
diff
changeset
|
242 |
(inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[ |
8973 | 243 |
m disableAll:#( doAddKey ) |
244 |
]. |
|
245 |
(inspectedObject isSharedPool) ifTrue:[ |
|
246 |
m disableAll:#( doRemoveKey ) |
|
7942
fce54ed1ef8b
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7805
diff
changeset
|
247 |
]. |
fce54ed1ef8b
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7805
diff
changeset
|
248 |
|
9379 | 249 |
(selIdx := self theSingleSelectionIndex) isNil ifTrue:[ |
1665 | 250 |
m disableAll:#(doInspect doInspectKey doBasicInspect doNewInspect |
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
251 |
doStartMonitor doStopMonitor doCopyKey |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
252 |
showKeyReferences showReferences showOwners browse |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
253 |
). |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
254 |
selectionIndex isEmptyOrNil ifTrue:[ |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
255 |
"/ allowed for multi-select |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
256 |
m disableAll:#( doRemoveKey ) |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
257 |
] |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
258 |
] ifFalse:[ |
9379 | 259 |
(self keyIndexForLine:selIdx) isNil ifTrue:[ |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
260 |
m disableAll:#(doInspectKey doRemoveKey doCopyKey) |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
261 |
] |
1665 | 262 |
]. |
7946 | 263 |
hideLiteralValues == true ifTrue:[ |
264 |
m disableAll:#( doShowNilValues doHideNilValues ) |
|
265 |
]. |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
266 |
|
1665 | 267 |
^ m. |
268 |
||
11815 | 269 |
"Modified: / 26-09-2012 / 13:20:59 / cg" |
36 | 270 |
! ! |
200 | 271 |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
272 |
!DictionaryInspectorView methodsFor:'menu actions'! |
200 | 273 |
|
3198 | 274 |
browse |
275 |
|cls| |
|
276 |
||
277 |
cls := self selection class theNonMetaclass. |
|
278 |
"/ cls isNameSpace ifTrue:[ |
|
279 |
"/ self halt. |
|
280 |
"/ ]. |
|
281 |
cls browserClass openInClass:cls selector:nil |
|
282 |
! |
|
283 |
||
200 | 284 |
doAddKey |
285 |
"add a key" |
|
286 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
287 |
|keyName key val l| |
200 | 288 |
|
3198 | 289 |
keyName := Dialog request:'Key to add (storeString):' initialAnswer:''. |
9502
49a0c6fc64b4
comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents:
9379
diff
changeset
|
290 |
keyName notEmptyOrNil ifTrue:[ |
3198 | 291 |
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
|
292 |
(inspectedObject includesKey:key) ifFalse:[ |
3198 | 293 |
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
|
294 |
val notNil ifTrue:[ |
3198 | 295 |
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
|
296 |
]. |
3198 | 297 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
298 |
inspectedObject at:key put:val. |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
2215
diff
changeset
|
299 |
selectionIndex := selectedLine := nil. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
300 |
inspectedObject changed. |
2213
d6e6c41db3ef
keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents:
2212
diff
changeset
|
301 |
l := listView firstLineShown. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
302 |
self reinspect. "force list update" |
2213
d6e6c41db3ef
keep scroll-offset when removing a key
Claus Gittinger <cg@exept.de>
parents:
2212
diff
changeset
|
303 |
listView scrollToLine:l |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
304 |
] |
200 | 305 |
] |
9502
49a0c6fc64b4
comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents:
9379
diff
changeset
|
306 |
|
49a0c6fc64b4
comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents:
9379
diff
changeset
|
307 |
"Modified: / 01-07-2010 / 10:53:25 / cg" |
200 | 308 |
! |
309 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
310 |
doHideAliases |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
311 |
hideAliases := true. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
312 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
313 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
314 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
315 |
doHideClassVars |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
316 |
hideClassVars := true. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
317 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
318 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
319 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
320 |
doHideClasses |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
321 |
hideClasses := true. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
322 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
323 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
324 |
|
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
325 |
doHideColorsAndImages |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
326 |
hideColorsAndImages := true. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
327 |
self reinspect |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
328 |
! |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
329 |
|
7946 | 330 |
doHideLiteralValues |
331 |
hideLiteralValues := true. |
|
332 |
self reinspect |
|
333 |
! |
|
334 |
||
335 |
doHideNilValues |
|
336 |
hideNilValues := true. |
|
337 |
self reinspect |
|
338 |
! |
|
339 |
||
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
340 |
doHideSignalInstances |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
341 |
hideSignalInstances := true. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
342 |
self reinspect |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
343 |
! |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
344 |
|
8403 | 345 |
doHideUnloadedClasses |
346 |
hideUnloadedClasses := true. |
|
347 |
self reinspect |
|
348 |
! |
|
349 |
||
200 | 350 |
doInspectKey |
351 |
"inspect selected items key" |
|
352 |
||
4269 | 353 |
|key| |
200 | 354 |
|
4269 | 355 |
key := self selectedKey. |
356 |
key notNil ifTrue:[ |
|
14261
89fca378e089
class: DictionaryInspectorView
Stefan Vogel <sv@exept.de>
parents:
13624
diff
changeset
|
357 |
self inspectNext:key. |
4269 | 358 |
] |
200 | 359 |
! |
360 |
||
361 |
doRemoveKey |
|
362 |
"remove selected item from keys" |
|
363 |
||
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
364 |
|l| |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
365 |
|
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
366 |
listView withWaitCursorDo:[ |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
367 |
self selectedKeys do:[:key | |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
368 |
(inspectedObject includesKey:key) ifTrue:[ |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
369 |
inspectedObject removeKey:key |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
370 |
] |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
371 |
]. |
200 | 372 |
|
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
373 |
keys := nil. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
374 |
selectionIndex := selectedLine := nil. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
375 |
inspectedObject changed. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
376 |
]. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
377 |
|
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
378 |
l := listView firstLineShown. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
379 |
self reinspect. "force list update" |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
380 |
listView scrollToLine:l. |
1740 | 381 |
! |
382 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
383 |
doShowAliases |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
384 |
hideAliases := false. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
385 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
386 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
387 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
388 |
doShowClassVars |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
389 |
hideClassVars := false. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
390 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
391 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
392 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
393 |
doShowClasses |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
394 |
hideClasses := false. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
395 |
self reinspect |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
396 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
397 |
|
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
398 |
doShowColorsAndImages |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
399 |
hideColorsAndImages := false. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
400 |
self reinspect |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
401 |
! |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
402 |
|
7946 | 403 |
doShowLiteralValues |
404 |
hideLiteralValues := false. |
|
405 |
self reinspect |
|
406 |
! |
|
407 |
||
408 |
doShowNilValues |
|
409 |
hideNilValues := false. |
|
410 |
self reinspect |
|
411 |
! |
|
412 |
||
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
413 |
doShowSignalInstances |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
414 |
hideSignalInstances := false. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
415 |
self reinspect |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
416 |
! |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
417 |
|
8403 | 418 |
doShowUnloadedClasses |
419 |
hideUnloadedClasses := false. |
|
420 |
self reinspect |
|
421 |
! |
|
422 |
||
1740 | 423 |
showKeyReferences |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
424 |
"show users of selected key (i.e. global). |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
425 |
Only useful when inspecting smalltalk" |
1740 | 426 |
|
4269 | 427 |
|key| |
1740 | 428 |
|
4269 | 429 |
key := self selectedKey. |
430 |
key notNil ifTrue:[ |
|
2274 | 431 |
self topView withWaitCursorDo:[ |
4269 | 432 |
UserPreferences systemBrowserClass browseReferendsOf:(key asSymbol) |
1740 | 433 |
]. |
434 |
] |
|
12598
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
435 |
! |
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
436 |
|
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
437 |
showReferencesToKey |
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
438 |
self selectedKey class hasImmediateInstances ifTrue:[ |
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
439 |
^ self warn:'Sorry - cannot show references to immediate objects' |
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
440 |
]. |
8dcaa0fcccc1
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12111
diff
changeset
|
441 |
ObjectMemory displayRefChainTo:(self selectedKey) |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
442 |
! ! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
443 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
444 |
!DictionaryInspectorView methodsFor:'private'! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
445 |
|
9926 | 446 |
allNumericKeys |
447 |
inspectedObject keysDo:[:k | k isNumber ifFalse:[^ false]]. |
|
448 |
^ true |
|
449 |
||
450 |
"Created: / 10-05-2011 / 08:05:45 / cg" |
|
451 |
! |
|
452 |
||
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
453 |
baseInspectedObjectClass |
2297
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
454 |
|
2298 | 455 |
(inspectedObject isMemberOf:Dictionary) ifFalse:[ |
456 |
(inspectedObject class inheritsFrom:Dictionary) ifFalse:[ |
|
457 |
"this is true for e.g. MethodDictionary" |
|
458 |
^ Object |
|
459 |
] |
|
2297
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
460 |
]. |
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
461 |
^ Dictionary |
2297
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
462 |
|
a881c775d42f
Fix for classes like MethodDictionary, that are not a subclass of Dictionary.
Stefan Vogel <sv@exept.de>
parents:
2274
diff
changeset
|
463 |
"Modified: / 23.7.1999 / 10:39:11 / stefan" |
2298 | 464 |
|
465 |
||
2193
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
466 |
! |
3d7b1044e8c8
fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents:
2190
diff
changeset
|
467 |
|
649 | 468 |
defaultLabel |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3874
diff
changeset
|
469 |
^ 'Keys' |
649 | 470 |
|
471 |
"Created: 28.6.1996 / 19:46:51 / cg" |
|
472 |
! |
|
473 |
||
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
474 |
indexList |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
475 |
"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
|
476 |
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
|
477 |
|
9927 | 478 |
|sortBlockForKeys allShown| |
9926 | 479 |
|
13624
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
480 |
(inspectedObject isNameSpace |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
481 |
or:[inspectedObject isSharedPool]) ifTrue:[ |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
482 |
^ self indexListForNameSpace. |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
483 |
]. |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
484 |
|
9927 | 485 |
allShown := inspectedObject size <= nShown. |
486 |
||
487 |
(allShown and:[self allNumericKeys]) ifTrue:[ |
|
9926 | 488 |
sortBlockForKeys := [:a :b | a < b]. |
489 |
] ifFalse:[ |
|
490 |
sortBlockForKeys := [:a :b | a displayString < b displayString]. |
|
491 |
]. |
|
492 |
||
8527
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
493 |
"/ do not use 'inspectedObject keys', |
2647
888a03260cf0
be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents:
2645
diff
changeset
|
494 |
"/ since Sets cannot hold nils (which are now valid keys) |
9927 | 495 |
allShown ifFalse:[ |
9926 | 496 |
keys := (SortedCollection new:nShown) sortBlock:sortBlockForKeys. |
8527
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
497 |
inspectedObject keysDo:[:k | |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
498 |
keys add:k. |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
499 |
keys size >= nShown ifTrue:[ |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
500 |
hasMore := true. |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
501 |
^ keys |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
502 |
]. |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
503 |
]. |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
504 |
]. |
1f78e8ddae80
also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents:
8470
diff
changeset
|
505 |
|
9927 | 506 |
keys := OrderedCollection new. |
2647
888a03260cf0
be prepared for nil being a valid key
Claus Gittinger <cg@exept.de>
parents:
2645
diff
changeset
|
507 |
inspectedObject keysDo:[:k | keys add:k]. |
9926 | 508 |
keys := keys asSortedCollection:sortBlockForKeys. |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
509 |
^ keys |
9926 | 510 |
|
9927 | 511 |
"Modified: / 10-05-2011 / 08:14:59 / cg" |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
512 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
513 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
514 |
indexListForNameSpace |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
515 |
"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
|
516 |
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
|
517 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
518 |
keys := SortedCollection new:1000. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
519 |
|
8403 | 520 |
inspectedObject keysDo:[:k | |
521 |
|hidden i o| |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
522 |
|
8403 | 523 |
hidden := false. |
524 |
hideClassVars == true ifTrue:[ |
|
525 |
(i := k lastIndexOf:$:) ~~ 0 ifTrue:[ |
|
526 |
(i > 1 and:[(k at:i-1) ~~ $:]) ifTrue:[ |
|
527 |
hidden := true |
|
528 |
]. |
|
529 |
]. |
|
530 |
]. |
|
531 |
(hidden not and:[hideNilValues == true]) ifTrue:[ |
|
532 |
o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ]. |
|
533 |
o isNil ifTrue:[ |
|
534 |
hidden := true |
|
535 |
]. |
|
536 |
]. |
|
537 |
(hidden not and:[hideClasses == true]) ifTrue:[ |
|
538 |
o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ]. |
|
539 |
o isBehavior ifTrue:[ |
|
540 |
inspectedObject == Smalltalk ifTrue:[ |
|
541 |
o name == k ifTrue:[ |
|
542 |
hidden := true |
|
543 |
] |
|
544 |
] ifFalse:[ |
|
545 |
o nameWithoutNameSpacePrefix = k ifTrue:[ |
|
546 |
hidden := true |
|
547 |
] |
|
548 |
] |
|
549 |
]. |
|
550 |
]. |
|
551 |
(hidden not and:[hideAliases == true]) ifTrue:[ |
|
552 |
o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ]. |
|
553 |
o isBehavior ifTrue:[ |
|
554 |
inspectedObject == Smalltalk ifTrue:[ |
|
555 |
o name ~~ k ifTrue:[ |
|
556 |
hidden := true |
|
557 |
] |
|
558 |
] ifFalse:[ |
|
559 |
o nameWithoutNameSpacePrefix ~= k ifTrue:[ |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
560 |
hidden := true |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
561 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
562 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
563 |
]. |
8403 | 564 |
]. |
565 |
(hidden not and:[hideLiteralValues == true]) ifTrue:[ |
|
8470
2bec16caeefb
changed #indexListForNameSpace
Claus Gittinger <cg@exept.de>
parents:
8403
diff
changeset
|
566 |
self breakPoint:#cg. |
8403 | 567 |
o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ]. |
568 |
o isLiteral ifTrue:[ |
|
569 |
hidden := true |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
570 |
]. |
8403 | 571 |
]. |
12624
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
572 |
(hidden not and:[hideColorsAndImages == true]) ifTrue:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
573 |
o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ]. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
574 |
(o isColor or:[o isImageOrForm or:[o class == Cursor]]) ifTrue:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
575 |
hidden := true |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
576 |
]. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
577 |
]. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
578 |
(hidden not and:[hideSignalInstances == true]) ifTrue:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
579 |
o isNil ifTrue:[ o := inspectedObject at:k ifAbsent:nil ]. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
580 |
(o isException or:[o isKindOf:Signal]) ifTrue:[ |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
581 |
hidden := true |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
582 |
]. |
fd12279a7888
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12598
diff
changeset
|
583 |
]. |
7946 | 584 |
|
8403 | 585 |
hidden ifFalse:[keys add:k] |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
586 |
]. |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
587 |
^ keys |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
588 |
! |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
589 |
|
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
590 |
indexedFieldList |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
591 |
"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
|
592 |
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
|
593 |
|
11516 | 594 |
|indexList keyList| |
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
595 |
|
11516 | 596 |
indexList := self indexList. |
597 |
keyList := indexList |
|
3874
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
598 |
collect:[:k | |
ed3a652e5ce0
all indexed vars for dictionaries
Claus Gittinger <cg@exept.de>
parents:
3870
diff
changeset
|
599 |
k isSymbol |
11516 | 600 |
ifTrue:[ k printString] |
13624
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
601 |
ifFalse:[ |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
602 |
k isInteger |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
603 |
ifTrue:[ self basicDisplayStringForValue:k ] |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
604 |
ifFalse:[ k displayString ] |
b59ab4a6247d
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
13576
diff
changeset
|
605 |
] |
11516 | 606 |
]. |
607 |
||
11815 | 608 |
sortOrder == #alphabetical ifTrue:[ |
609 |
keyList sort:[:a :b | a string < b string]. |
|
610 |
]. |
|
11516 | 611 |
^ keyList |
612 |
keysAndValuesCollect:[:idx :nm | |
|
14678
079d9fc7384d
Fix in DictionaryInspectorView>>#indexedFieldList: use #indexedValueAtKey: instead of object #at:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14261
diff
changeset
|
613 |
self listEntryForName:nm value:(self indexedValueAtKey:(indexList at:idx)) |
11516 | 614 |
]. |
11815 | 615 |
"/ ^ keyList |
11516 | 616 |
|
11815 | 617 |
"Modified: / 26-09-2012 / 13:22:08 / cg" |
14678
079d9fc7384d
Fix in DictionaryInspectorView>>#indexedFieldList: use #indexedValueAtKey: instead of object #at:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14261
diff
changeset
|
618 |
"Modified: / 25-07-2014 / 09:44:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
619 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
620 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
621 |
instVarIndexForLine:lineNr |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
622 |
"helper - return the index for a named instVar; |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
623 |
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
|
624 |
|
7942
fce54ed1ef8b
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7805
diff
changeset
|
625 |
(inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[ |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
626 |
^ nil |
957
ecbcb2c15ae8
show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents:
689
diff
changeset
|
627 |
]. |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
628 |
^ super instVarIndexForLine:lineNr |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
629 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
630 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
631 |
keyIndexForLine:lineNr |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
632 |
"helper - return the index of the key-list" |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
633 |
|
5421
86a6077b131d
Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents:
4269
diff
changeset
|
634 |
|firstRealIndex idx line| |
4100 | 635 |
|
7942
fce54ed1ef8b
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7805
diff
changeset
|
636 |
(inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[ |
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3874
diff
changeset
|
637 |
(self hasSelfEntry |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
638 |
and:[lineNr == 1 or:[lineNr isNil]]) ifTrue:[ |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
639 |
^ nil "/ self selected |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
640 |
]. |
4100 | 641 |
firstRealIndex := 1. |
642 |
idx := lineNr. |
|
11512 | 643 |
[line := self listEntryAt:firstRealIndex. |
5421
86a6077b131d
Fix for negative numbers as keys in a Dictionary
Stefan Vogel <sv@exept.de>
parents:
4269
diff
changeset
|
644 |
(line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[ |
4100 | 645 |
firstRealIndex := firstRealIndex + 1. |
646 |
idx := idx - 1. |
|
4095
5bd36b14723d
labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents:
3874
diff
changeset
|
647 |
]. |
4100 | 648 |
|
649 |
^ idx |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
650 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
651 |
^ super keyIndexForLine:lineNr |
11512 | 652 |
|
653 |
"Modified: / 16-05-2012 / 17:56:01 / cg" |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
654 |
! |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
655 |
|
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
656 |
namedFieldList |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
657 |
"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
|
658 |
|
7942
fce54ed1ef8b
sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents:
7805
diff
changeset
|
659 |
(inspectedObject isNameSpace or:[inspectedObject isSharedPool]) ifTrue:[ |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
660 |
"/ empty ... |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
661 |
^ OrderedCollection new |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
662 |
]. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
663 |
^ super namedFieldList |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
664 |
! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
665 |
|
12834 | 666 |
numIndexedFields |
667 |
^ inspectedObject size |
|
668 |
! |
|
669 |
||
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
670 |
release |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
671 |
"release inspected object" |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
672 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
673 |
keys := nil. |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
674 |
super release |
4269 | 675 |
! |
676 |
||
677 |
selectedKey |
|
13576
3fd34524bbb9
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12834
diff
changeset
|
678 |
"selected item's key or nil. But only if exactly one item is selected" |
4269 | 679 |
|
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
680 |
|selIdx idx| |
4269 | 681 |
|
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
682 |
selIdx := self theSingleSelectionIndex. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
683 |
selIdx notNil ifTrue:[ |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
684 |
idx := self keyIndexForLine:selIdx. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
685 |
idx notNil ifTrue:[ |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
686 |
^ (keys at:idx) |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
687 |
]. |
4269 | 688 |
]. |
689 |
^ nil. |
|
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
690 |
! |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
691 |
|
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
692 |
selectedKeys |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
693 |
"selected keys or empty" |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
694 |
|
13576
3fd34524bbb9
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
12834
diff
changeset
|
695 |
^ (listView selection ? #()) |
9376
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
696 |
collect:[:eachSelectionIndex | |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
697 |
|idx| |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
698 |
|
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
699 |
idx := self keyIndexForLine:eachSelectionIndex. |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
700 |
idx notNil |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
701 |
ifTrue:[ (keys at:idx) ] |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
702 |
ifFalse:[ nil ] |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
703 |
] |
8312c2e767ea
allow multiSelect in dictionary inspector (for removeKey)
Claus Gittinger <cg@exept.de>
parents:
9350
diff
changeset
|
704 |
thenSelect:[:each | each notNil]. |
9502
49a0c6fc64b4
comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents:
9379
diff
changeset
|
705 |
|
49a0c6fc64b4
comment/format in: #doRemoveKey
Claus Gittinger <cg@exept.de>
parents:
9379
diff
changeset
|
706 |
"Modified: / 01-07-2010 / 10:54:31 / cg" |
9505 | 707 |
! |
708 |
||
709 |
selection:lineNrCollection |
|
710 |
"redefined because of multiselect" |
|
711 |
||
712 |
lineNrCollection isEmptyOrNil ifTrue:[ |
|
713 |
self showSelection:nil |
|
714 |
] ifFalse:[ |
|
715 |
self showSelection:lineNrCollection first |
|
716 |
]. |
|
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
717 |
! ! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
718 |
|
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
719 |
!DictionaryInspectorView methodsFor:'user interaction'! |
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
720 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
721 |
indexedValueAtIndex:idx |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
722 |
|key| |
470
5bb60cb688c8
category rename / added monitor stuff
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
723 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
724 |
key := keys at:idx. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
725 |
^ inspectedObject at:key ifAbsent:nil. |
2190
12158a4f0d9c
care for last change when accepting
Claus Gittinger <cg@exept.de>
parents:
2189
diff
changeset
|
726 |
|
200 | 727 |
! |
728 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
729 |
indexedValueAtIndex:idx put:newValue |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
730 |
|key| |
200 | 731 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
732 |
key := keys at:idx. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
733 |
inspectedObject at:key put:newValue. |
200 | 734 |
! ! |
735 |
||
957
ecbcb2c15ae8
show a waitCursor, while collecitng keys
Claus Gittinger <cg@exept.de>
parents:
689
diff
changeset
|
736 |
!DictionaryInspectorView class methodsFor:'documentation'! |
200 | 737 |
|
738 |
version |
|
14678
079d9fc7384d
Fix in DictionaryInspectorView>>#indexedFieldList: use #indexedValueAtKey: instead of object #at:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14261
diff
changeset
|
739 |
^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.85 2014-07-25 08:49:38 vrany Exp $' |
8973 | 740 |
! |
741 |
||
742 |
version_CVS |
|
14678
079d9fc7384d
Fix in DictionaryInspectorView>>#indexedFieldList: use #indexedValueAtKey: instead of object #at:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14261
diff
changeset
|
743 |
^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.85 2014-07-25 08:49:38 vrany Exp $' |
200 | 744 |
! ! |
12111
0da8cd378b6f
class: DictionaryInspectorView
Claus Gittinger <cg@exept.de>
parents:
11815
diff
changeset
|
745 |