54
54
class DlvStackFrame extends XStackFrame {
55
55
private final DlvApi .Location myLocation ;
56
56
private final DlvCommandProcessor myProcessor ;
57
- private final boolean myTop ;
57
+ private final int myId ;
58
58
private static final Set <String > NUMBERS = ContainerUtil .newTroveSet (
59
59
"int8" ,
60
60
"uint8" ,
@@ -78,22 +78,21 @@ class DlvStackFrame extends XStackFrame {
78
78
"rune"
79
79
);
80
80
81
- public DlvStackFrame (DlvApi .Location location , DlvCommandProcessor processor , boolean top ) {
81
+ public DlvStackFrame (DlvApi .Location location , DlvCommandProcessor processor , int id ) {
82
82
myLocation = location ;
83
83
myProcessor = processor ;
84
- myTop = top ;
84
+ myId = id ;
85
85
}
86
86
87
87
@ Nullable
88
88
@ Override
89
89
public XDebuggerEvaluator getEvaluator () {
90
- if (!myTop ) return null ;
91
90
return new XDebuggerEvaluator () {
92
91
@ Override
93
92
public void evaluate (@ NotNull String expression ,
94
93
@ NotNull final XEvaluationCallback callback ,
95
94
@ Nullable XSourcePosition expressionPosition ) {
96
- myProcessor .send (new DlvRequest .EvalSymbol (expression ))
95
+ myProcessor .send (new DlvRequest .EvalSymbol (expression , myId ))
97
96
.done (new Consumer <DlvApi .Variable >() {
98
97
@ Override
99
98
public void consume (@ NotNull DlvApi .Variable variable ) {
@@ -194,16 +193,12 @@ private <T> Promise<T> send(@NotNull DlvRequest<T> request) {
194
193
195
194
@ Override
196
195
public void computeChildren (@ NotNull final XCompositeNode node ) {
197
- if (!myTop ) {
198
- super .computeChildren (node );
199
- return ;
200
- }
201
- send (new DlvRequest .ListLocalVars ()).done (new Consumer <List <DlvApi .Variable >>() {
196
+ send (new DlvRequest .ListLocalVars (myId )).done (new Consumer <List <DlvApi .Variable >>() {
202
197
@ Override
203
198
public void consume (@ NotNull List <DlvApi .Variable > variables ) {
204
199
final XValueChildrenList xVars = new XValueChildrenList (variables .size ());
205
200
for (DlvApi .Variable v : variables ) xVars .add (v .name , createXValue (v , GoIcons .VARIABLE ));
206
- send (new DlvRequest .ListFunctionArgs ()).done (new Consumer <List <DlvApi .Variable >>() {
201
+ send (new DlvRequest .ListFunctionArgs (myId )).done (new Consumer <List <DlvApi .Variable >>() {
207
202
@ Override
208
203
public void consume (@ NotNull List <DlvApi .Variable > args ) {
209
204
for (DlvApi .Variable v : args ) xVars .add (v .name , createXValue (v , GoIcons .PARAMETER ));
0 commit comments