author | Claus Gittinger <cg@exept.de> |
Sat, 17 Jan 1998 15:22:24 +0100 | |
changeset 1401 | 07f27176adc6 |
parent 1395 | 1c7f8d3794f7 |
child 1523 | fb99bad7e005 |
permissions | -rw-r--r-- |
34 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
45 | 3 |
All Rights Reserved |
34 | 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 |
||
13 |
InspectorView subclass:#ContextInspectorView |
|
1395 | 14 |
instanceVariableNames:'inspectedContext names showingTemporaries argsOnly contextSize' |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
15 |
classVariableNames:'' |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
16 |
poolDictionaries:'' |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
17 |
category:'Interface-Inspector' |
34 | 18 |
! |
19 |
||
785 | 20 |
!ContextInspectorView class methodsFor:'documentation'! |
34 | 21 |
|
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
45 | 25 |
All Rights Reserved |
34 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
471 | 38 |
a modified Inspector for Contexts (used in the Debugger) |
39 |
TODO: |
|
40 |
when expressions are evaluated in myself, the inst-var |
|
41 |
names are not known by the expression evaluator. |
|
42 |
This has to be fixed |
|
43 |
(actual work is to be done in the Parser to allow passing of a context ...) |
|
510 | 44 |
|
45 |
[author:] |
|
46 |
Claus Gittinger |
|
47 |
||
48 |
[see also:] |
|
49 |
Context DebugView |
|
34 | 50 |
" |
51 |
! ! |
|
52 |
||
53 |
!ContextInspectorView methodsFor:'accessing'! |
|
54 |
||
868 | 55 |
inspect:aContext |
34 | 56 |
"set the context to be inspected" |
57 |
||
107 | 58 |
|homeContext method homeNames rec sel implementorClass |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
59 |
argNames varNames tmpNames m argsOnly blockNode vars |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
60 |
numVarsInSource numVarsInContext isDoIt |
1401 | 61 |
numArgs numVars n tempNames realTempNames src| |
34 | 62 |
|
868 | 63 |
(aContext == inspectedContext) ifTrue:[ |
1395 | 64 |
"/ care for contexts which change size |
65 |
"/ (after the locals & stack-setup) |
|
66 |
contextSize == inspectedContext size ifTrue:[ |
|
67 |
listView selection notNil ifTrue:[ |
|
68 |
self showSelection:(listView selection). |
|
69 |
]. |
|
70 |
^ self |
|
71 |
] |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
72 |
]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
73 |
|
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
74 |
hasMore := argsOnly := false. |
34 | 75 |
inspectedObject := nil. |
868 | 76 |
inspectedContext := aContext. |
1395 | 77 |
contextSize := inspectedContext size. |
49 | 78 |
|
868 | 79 |
aContext isNil ifTrue:[ |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
80 |
names := nil. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
81 |
listView list:nil. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
82 |
^ self |
34 | 83 |
]. |
84 |
||
56 | 85 |
"/ realized ifFalse:[^ self]. |
86 |
||
868 | 87 |
homeContext := aContext methodHome. |
51 | 88 |
|
89 |
homeContext isNil ifTrue:[ |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
90 |
"its a cheap blocks context" |
868 | 91 |
rec := aContext receiver. |
92 |
sel := aContext selector. |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
93 |
homeNames := OrderedCollection new. |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
94 |
isDoIt := false. |
51 | 95 |
] ifFalse:[ |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
96 |
rec := homeContext receiver. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
97 |
sel := homeContext selector. |
34 | 98 |
|
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
99 |
"/ #doIt needs special handling below |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
100 |
isDoIt := (sel == #doIt) or:[sel == #doIt:]. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
101 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
102 |
method := homeContext method. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
103 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
104 |
"/ implementorClass := homeContext methodClass. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
105 |
"/ implementorClass notNil ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
106 |
"/ method := implementorClass compiledMethodAt:sel. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
107 |
"/ ] ifFalse:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
108 |
"/ "/ mhm - an unbound method; |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
109 |
"/ "/ see if it was invoked by a direct call |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
110 |
"/ "/ consider this a kludge |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
111 |
"/ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
112 |
"/ homeContext sender notNil ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
113 |
"/ (homeContext sender selector startsWith:'valueWithReceiver:') ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
114 |
"/ method := homeContext sender receiver |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
115 |
"/ ] |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
116 |
"/ ] |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
117 |
"/ ]. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
118 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
119 |
(method notNil |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
120 |
and:[method isWrapped]) ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
121 |
" |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
122 |
in a wrapped context, locals are something different |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
123 |
" |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
124 |
"/ argsOnly := true. |
1026
b863f3784b3c
oops - methods with inlined blockVars did not show its vars
Claus Gittinger <cg@exept.de>
parents:
977
diff
changeset
|
125 |
|
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
126 |
m := method originalMethod. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
127 |
m notNil ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
128 |
method := m. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
129 |
] ifFalse:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
130 |
argsOnly := true. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
131 |
]. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
132 |
]. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
133 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
134 |
method notNil ifTrue:[ |
1395 | 135 |
"/ method source notNil ifTrue:[ |
1026
b863f3784b3c
oops - methods with inlined blockVars did not show its vars
Claus Gittinger <cg@exept.de>
parents:
977
diff
changeset
|
136 |
|
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
137 |
argsOnly ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
138 |
homeNames := method methodArgNames |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
139 |
] ifFalse:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
140 |
homeNames := method methodArgAndVarNames. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
141 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
142 |
"/ did it already allocate its locals ? |
1026
b863f3784b3c
oops - methods with inlined blockVars did not show its vars
Claus Gittinger <cg@exept.de>
parents:
977
diff
changeset
|
143 |
homeNames size > (homeContext numArgs + homeContext numVars) |
b863f3784b3c
oops - methods with inlined blockVars did not show its vars
Claus Gittinger <cg@exept.de>
parents:
977
diff
changeset
|
144 |
ifTrue:[ |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
145 |
homeNames := method methodArgNames. |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
146 |
argsOnly := true. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
147 |
]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
148 |
]. |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
149 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
150 |
"/ there is one case, where the above is by purpose: |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
151 |
"/ the #doIt - method, which has been given an invalid |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
152 |
"/ source. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
153 |
"/ care for this here. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
154 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
155 |
isDoIt ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
156 |
homeNames := #(). |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
157 |
] ifFalse:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
158 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
159 |
"/ check |
785 | 160 |
|
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
161 |
numVarsInContext := homeContext argsAndVars size. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
162 |
numVarsInSource := homeNames size. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
163 |
|
977 | 164 |
numVarsInSource > 0 ifTrue:[ |
1026
b863f3784b3c
oops - methods with inlined blockVars did not show its vars
Claus Gittinger <cg@exept.de>
parents:
977
diff
changeset
|
165 |
numVarsInContext < numVarsInSource ifTrue:[ |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
166 |
|
977 | 167 |
"/ the methods source does not correctly reflect |
168 |
"/ the number of args&vars in the context. |
|
169 |
"/ either outDated, or somehow strange. |
|
170 |
"/ (happens with wrapped methods, which are not |
|
171 |
"/ what they look) |
|
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
172 |
|
977 | 173 |
numVarsInSource > numVarsInContext ifTrue:[ |
174 |
homeNames := homeNames copyTo:numVarsInContext. |
|
976
95a817dc94a2
fixed arg-name display of wrapped methods
Claus Gittinger <cg@exept.de>
parents:
948
diff
changeset
|
175 |
] ifFalse:[ |
977 | 176 |
numVarsInContext >= homeContext numArgs ifTrue:[ |
177 |
homeNames := homeNames copyTo:homeContext numArgs |
|
178 |
] ifFalse:[ |
|
179 |
homeNames := nil |
|
180 |
] |
|
181 |
] |
|
785 | 182 |
] |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
183 |
] |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
184 |
] |
1395 | 185 |
"/ ] |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
186 |
]. |
73 | 187 |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
188 |
" |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
189 |
create dummy names for method vars (if there is no source available) |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
190 |
" |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
191 |
homeNames isNil ifTrue:[ |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
192 |
homeNames := OrderedCollection new. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
193 |
1 to:homeContext numArgs do:[:index | |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
194 |
homeNames add:('mArg' , index printString) |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
195 |
]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
196 |
argsOnly ifFalse:[ |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
197 |
1 to:homeContext numVars do:[:index | |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
198 |
homeNames add:('mVar' , index printString) |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
199 |
]. |
1395 | 200 |
"/ showingTemporaries ifTrue:[ |
201 |
"/ 1 to:homeContext numTemps do:[:index | |
|
202 |
"/ homeNames add:('mTmp' , index printString) |
|
203 |
"/ ] |
|
204 |
"/ ] |
|
205 |
] |
|
206 |
]. |
|
207 |
showingTemporaries ifTrue:[ |
|
208 |
1 to:homeContext numTemps do:[:index | |
|
209 |
homeNames add:('mTmp' , index printString) |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
210 |
] |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
211 |
]. |
1204
e2f7a2409f7d
inlined vars/args are shown as *t<i>
Claus Gittinger <cg@exept.de>
parents:
1026
diff
changeset
|
212 |
|
e2f7a2409f7d
inlined vars/args are shown as *t<i>
Claus Gittinger <cg@exept.de>
parents:
1026
diff
changeset
|
213 |
n := homeNames size. |
e2f7a2409f7d
inlined vars/args are shown as *t<i>
Claus Gittinger <cg@exept.de>
parents:
1026
diff
changeset
|
214 |
n < (homeContext numVars + homeContext numArgs) ifTrue:[ |
1370
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
215 |
"/ its a context which includes locals from |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
216 |
"/ inlined sub-blocks. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
217 |
"/ First, generate synthetic varNames ... |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
218 |
|
1204
e2f7a2409f7d
inlined vars/args are shown as *t<i>
Claus Gittinger <cg@exept.de>
parents:
1026
diff
changeset
|
219 |
homeNames := homeNames asOrderedCollection. |
1370
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
220 |
tempNames := OrderedCollection new. |
1204
e2f7a2409f7d
inlined vars/args are shown as *t<i>
Claus Gittinger <cg@exept.de>
parents:
1026
diff
changeset
|
221 |
n to:(homeContext numVars + homeContext numArgs - 1) do:[:inlinedTempIdx | |
1370
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
222 |
tempNames add:('*t' , (inlinedTempIdx - n + 1) printString) |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
223 |
]. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
224 |
|
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
225 |
"/ now, see if we can find out more |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
226 |
"/ (failes, if source is not available) |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
227 |
|
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
228 |
method notNil ifTrue:[ |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
229 |
(isDoIt and:[tempNames size > 0]) ifTrue:[ |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
230 |
"/ special for #doIt |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
231 |
"/ my source is found in the method. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
232 |
blockNode := Compiler |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
233 |
blockAtLine:(aContext lineNumber) |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
234 |
in:nil |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
235 |
orSource:('[' , method source , '\]') withCRs |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
236 |
numArgs:numArgs |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
237 |
numVars:numVars. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
238 |
] ifFalse:[ |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
239 |
blockNode := Compiler |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
240 |
blockAtLine:(homeContext lineNumber) |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
241 |
in:method |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
242 |
orSource:nil |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
243 |
numArgs:numArgs |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
244 |
numVars:numVars. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
245 |
]. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
246 |
|
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
247 |
realTempNames := OrderedCollection new. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
248 |
[blockNode notNil] whileTrue:[ |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
249 |
blockNode variables notNil ifTrue:[ |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
250 |
realTempNames := (blockNode variables collect:[:aVar | aVar name]) , realTempNames. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
251 |
]. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
252 |
blockNode arguments notNil ifTrue:[ |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
253 |
realTempNames := (blockNode arguments collect:[:aVar | aVar name]) , realTempNames. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
254 |
]. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
255 |
blockNode := blockNode home. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
256 |
]. |
1377 | 257 |
tempNames |
258 |
replaceFrom:1 to:(tempNames size min:realTempNames size) |
|
259 |
with:realTempNames. |
|
1370
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
260 |
]. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
261 |
|
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
262 |
homeNames := homeNames asOrderedCollection. |
d322faba88b9
better extract of block-var-names
Claus Gittinger <cg@exept.de>
parents:
1361
diff
changeset
|
263 |
homeNames addAll:tempNames. |
1204
e2f7a2409f7d
inlined vars/args are shown as *t<i>
Claus Gittinger <cg@exept.de>
parents:
1026
diff
changeset
|
264 |
] |
34 | 265 |
]. |
51 | 266 |
|
34 | 267 |
" |
268 |
stupid: should find the block via the contexts |
|
269 |
method-home and put real names in here |
|
270 |
" |
|
868 | 271 |
aContext isBlockContext ifTrue:[ |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
272 |
numArgs := aContext numArgs. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
273 |
numVars := aContext numVars. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
274 |
|
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
275 |
(numArgs > 0 or:[numVars > 0]) ifTrue:[ |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
276 |
|
948 | 277 |
method notNil ifTrue:[ |
278 |
isDoIt ifTrue:[ |
|
279 |
"/ special for #doIt |
|
280 |
"/ my source is found in the method. |
|
1401 | 281 |
m := nil. |
282 |
src := ('[' , method source , '\]') withCRs |
|
948 | 283 |
] ifFalse:[ |
1401 | 284 |
m := method. |
285 |
src := nil. |
|
286 |
]. |
|
287 |
blockNode := Compiler |
|
288 |
blockAtLine:(aContext lineNumber) |
|
289 |
in:m |
|
290 |
orSource:src |
|
291 |
numArgs:numArgs |
|
292 |
numVars:numVars. |
|
293 |
blockNode notNil ifTrue:[ |
|
294 |
numArgs > 0 ifTrue:[ |
|
295 |
vars := blockNode arguments. |
|
296 |
vars size > 0 ifTrue:[ |
|
297 |
argNames := vars collect:[:var | var name] |
|
298 |
] |
|
299 |
]. |
|
300 |
numVars > 0 ifTrue:[ |
|
301 |
vars := blockNode variables. |
|
302 |
vars size > 0 ifTrue:[ |
|
303 |
varNames := vars collect:[:var | var name]. |
|
304 |
] |
|
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
305 |
] |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
306 |
]. |
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
307 |
]. |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
308 |
]. |
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
309 |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
310 |
names := OrderedCollection new. |
51 | 311 |
|
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
312 |
argNames isNil ifTrue:[ |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
313 |
argNames := (1 to:numArgs) collect:[:i | 'arg' , i printString]. |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
314 |
]. |
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
315 |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
316 |
names addAll:argNames. |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
317 |
varNames isNil ifTrue:[ |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
318 |
varNames := (1 to:numVars) collect:[:i | 'var' , i printString]. |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
319 |
] ifFalse:[ |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
320 |
varNames size ~~ numVars ifTrue:[ |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
321 |
varNames := varNames asOrderedCollection. |
868 | 322 |
varNames size+1 to:aContext numVars do:[:i | |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
323 |
varNames add:('var' , i printString) |
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
324 |
] |
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
325 |
] |
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
326 |
]. |
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
327 |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
328 |
names addAll:varNames. |
51 | 329 |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
330 |
showingTemporaries ifTrue:[ |
868 | 331 |
tmpNames := (1 to:(aContext numTemps)) collect:[:i | 'tmp' , i printString]. |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
332 |
names addAll:tmpNames. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
333 |
]. |
51 | 334 |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
335 |
names addAll:homeNames. |
947
b9625d9b0881
better block-var name detection
Claus Gittinger <cg@exept.de>
parents:
868
diff
changeset
|
336 |
|
34 | 337 |
] ifFalse:[ |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
338 |
names := homeNames. |
34 | 339 |
]. |
73 | 340 |
|
341 |
listView list:names. |
|
34 | 342 |
|
343 |
workspace contents:nil. |
|
868 | 344 |
self setDoitActionIn:workspace for:aContext. |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
345 |
|
1401 | 346 |
"Modified: / 17.1.1998 / 03:22:43 / cg" |
34 | 347 |
! |
348 |
||
349 |
release |
|
350 |
"release inspected object" |
|
351 |
||
352 |
inspectedContext := nil. |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
353 |
names := nil. |
34 | 354 |
super release |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
355 |
|
297
3d34ce6e2b22
oops - leftover printMessage removed
Claus Gittinger <cg@exept.de>
parents:
296
diff
changeset
|
356 |
"Modified: 14.12.1995 / 21:49:43 / cg" |
34 | 357 |
! ! |
358 |
||
73 | 359 |
!ContextInspectorView methodsFor:'initialization'! |
51 | 360 |
|
73 | 361 |
fieldMenu |
1361 | 362 |
<resource: #programMenu > |
363 |
||
73 | 364 |
|labels selectors| |
365 |
||
366 |
showingTemporaries ifFalse:[ |
|
1361 | 367 |
labels := #( |
368 |
'inspect' |
|
369 |
'basicInspect' |
|
370 |
'-' |
|
371 |
'show temporaries' |
|
372 |
). |
|
373 |
selectors := #( |
|
374 |
doInspect |
|
375 |
doBasicInspect |
|
376 |
nil |
|
377 |
showTemporaries |
|
378 |
) |
|
73 | 379 |
] ifTrue:[ |
1361 | 380 |
labels := #( |
381 |
'inspect' |
|
382 |
'basicInspect' |
|
383 |
'-' |
|
384 |
'hide temporaries' |
|
385 |
). |
|
386 |
selectors := #( |
|
387 |
doInspect |
|
388 |
doBasicInspect |
|
389 |
nil |
|
390 |
hideTemporaries |
|
391 |
) |
|
73 | 392 |
]. |
393 |
||
394 |
^ PopUpMenu |
|
1361 | 395 |
labels:(resources array:labels) |
396 |
selectors:selectors |
|
397 |
||
398 |
"Modified: / 29.10.1997 / 03:40:03 / cg" |
|
200 | 399 |
! |
400 |
||
401 |
initialize |
|
402 |
super initialize. |
|
403 |
showingTemporaries := false. |
|
404 |
||
73 | 405 |
! ! |
200 | 406 |
|
407 |
!ContextInspectorView methodsFor:'private'! |
|
408 |
||
647 | 409 |
defaultLabel |
410 |
^ 'locals' |
|
411 |
||
412 |
" |
|
413 |
ContextInspectorView openOn:thisContext sender |
|
414 |
" |
|
415 |
||
416 |
"Modified: 28.6.1996 / 16:07:49 / cg" |
|
417 |
! |
|
418 |
||
200 | 419 |
fieldList |
420 |
^ names |
|
421 |
! |
|
422 |
||
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
423 |
hasSelfEntry |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
424 |
^ false |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
425 |
|
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
426 |
"Created: 14.12.1995 / 19:29:47 / cg" |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
427 |
! |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
428 |
|
200 | 429 |
setDoitActionIn:aWorkspace for:aContext |
430 |
aWorkspace doItAction:[:theCode | |
|
431 |
Compiler evaluate:theCode |
|
432 |
in:aContext |
|
433 |
receiver:nil |
|
434 |
notifying:aWorkspace |
|
435 |
logged:true |
|
436 |
ifFail:nil |
|
437 |
] |
|
438 |
! |
|
439 |
||
440 |
valueAtLine:lineNr |
|
441 |
"helper - return the value of the selected entry" |
|
442 |
||
868 | 443 |
|homeContext theContext values| |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
444 |
|
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
445 |
inspectedContext isNil ifTrue:[^ nil]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
446 |
|
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
447 |
argsOnly := false. |
868 | 448 |
theContext := inspectedContext. |
449 |
homeContext := theContext methodHome. |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
450 |
|
868 | 451 |
theContext isBlockContext ifTrue:[ |
452 |
values := Array withAll:(theContext argsAndVars). |
|
453 |
(showingTemporaries and:[theContext numTemps ~~ 0]) ifTrue:[ |
|
454 |
values := values , theContext temporaries |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
455 |
]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
456 |
homeContext notNil ifTrue:[ |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
457 |
values := values , homeContext args. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
458 |
argsOnly ifFalse:[ |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
459 |
values := values , homeContext vars. |
800
3abcfccedc0c
finally: show block-arg and var-names.
Claus Gittinger <cg@exept.de>
parents:
785
diff
changeset
|
460 |
(showingTemporaries and:[homeContext numTemps ~~ 0])ifTrue:[ |
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
461 |
values := values , homeContext temporaries |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
462 |
] |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
463 |
]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
464 |
]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
465 |
] ifFalse:[ |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
466 |
argsOnly ifTrue:[ |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
467 |
values := homeContext args |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
468 |
] ifFalse:[ |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
469 |
values := homeContext argsAndVars |
1395 | 470 |
]. |
471 |
(showingTemporaries and:[homeContext numTemps ~~ 0])ifTrue:[ |
|
472 |
values := values , homeContext temporaries |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
473 |
] |
1395 | 474 |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
475 |
]. |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
476 |
|
200 | 477 |
^ values at:lineNr. |
478 |
||
1395 | 479 |
"Modified: / 13.1.1998 / 15:55:16 / cg" |
200 | 480 |
! ! |
481 |
||
482 |
!ContextInspectorView methodsFor:'user actions'! |
|
483 |
||
484 |
doAccept:theText |
|
485 |
|value| |
|
486 |
||
487 |
selectedLine notNil ifTrue:[ |
|
488 |
value := Compiler evaluate:theText |
|
489 |
receiver:inspectedObject |
|
490 |
notifying:workspace. |
|
491 |
||
492 |
"yes, you can do that with a context" |
|
493 |
inspectedContext at:selectedLine put:value. |
|
494 |
]. |
|
495 |
! |
|
496 |
||
497 |
hideTemporaries |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
498 |
"do not show contexts temporaries" |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
499 |
|
200 | 500 |
showingTemporaries := false. |
501 |
self inspect:inspectedContext |
|
502 |
||
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
503 |
"Modified: 14.12.1995 / 19:24:44 / cg" |
200 | 504 |
! |
505 |
||
506 |
showTemporaries |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
507 |
"show contexts temporaries" |
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
508 |
|
200 | 509 |
showingTemporaries := true. |
510 |
self inspect:inspectedContext |
|
296
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
511 |
|
b480a51cfb5f
dont buffer values / keep context / update value (now try single stepping with a variable selected)
Claus Gittinger <cg@exept.de>
parents:
200
diff
changeset
|
512 |
"Modified: 14.12.1995 / 19:24:49 / cg" |
200 | 513 |
! ! |
514 |
||
785 | 515 |
!ContextInspectorView class methodsFor:'documentation'! |
200 | 516 |
|
517 |
version |
|
1401 | 518 |
^ '$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.40 1998-01-17 14:22:24 cg Exp $' |
200 | 519 |
! ! |