use of com.intellij.xdebugger.frame.XValueChildrenList in project intellij-community by JetBrains.
the class ErrorsValueGroup method computeChildren.
@Override
public void computeChildren(@NotNull XCompositeNode node) {
XValueChildrenList lst = new XValueChildrenList();
myErrorMessage2ValueMap.keySet().forEach(s -> lst.addTopGroup(new MyErrorsValueGroup(s)));
node.addChildren(lst, true);
}
use of com.intellij.xdebugger.frame.XValueChildrenList in project intellij-community by JetBrains.
the class PyDebugProcess method applyNewValue.
private XValueChildrenList applyNewValue(XValueChildrenList pyDebugValues, String threadFrameId) {
if (myNewVariableValue.containsKey(threadFrameId)) {
PyDebugValue newValue = myNewVariableValue.get(threadFrameId);
XValueChildrenList res = new XValueChildrenList();
for (int i = 0; i < pyDebugValues.size(); i++) {
final String name = pyDebugValues.getName(i);
if (name.equals(newValue.getName())) {
res.add(name, newValue);
} else {
res.add(name, pyDebugValues.getValue(i));
}
}
return res;
} else {
return pyDebugValues;
}
}
use of com.intellij.xdebugger.frame.XValueChildrenList in project intellij-community by JetBrains.
the class PyConsoleTask method getCompoundValueChildren.
protected List<String> getCompoundValueChildren(PyDebugValue value) throws PyDebuggerException {
XValueChildrenList list = myCommunication.loadVariable(value);
List<String> result = Lists.newArrayList();
for (int i = 0; i < list.size(); i++) {
result.add(((PyDebugValue) list.getValue(i)).getValue());
}
return result;
}
use of com.intellij.xdebugger.frame.XValueChildrenList in project intellij-community by JetBrains.
the class PyBaseDebuggerTask method getNumberOfReferringObjects.
protected int getNumberOfReferringObjects(String name) throws PyDebuggerException {
XValue var = XDebuggerTestUtil.evaluate(mySession, name).first;
final PyReferringObjectsValue value = new PyReferringObjectsValue((PyDebugValue) var);
EvaluationCallback callback = new EvaluationCallback();
myDebugProcess.loadReferrers(value, new PyDebugCallback<XValueChildrenList>() {
@Override
public void ok(XValueChildrenList valueList) {
callback.evaluated(valueList.size());
}
@Override
public void error(PyDebuggerException exception) {
callback.errorOccurred(exception.getMessage());
}
});
final Pair<Integer, String> result = callback.waitFor(NORMAL_TIMEOUT);
if (result.second != null) {
throw new PyDebuggerException(result.second);
}
return result.first;
}
use of com.intellij.xdebugger.frame.XValueChildrenList in project intellij-community by JetBrains.
the class GetFrameCommand method processResponse.
@Override
protected void processResponse(final ProtocolFrame response) throws PyDebuggerException {
super.processResponse(response);
final List<PyDebugValue> values = ProtocolParser.parseValues(response.getPayload(), myDebugProcess);
myFrameVariables = new XValueChildrenList(values.size());
for (PyDebugValue value : values) {
if (!value.getName().startsWith(RemoteDebugger.TEMP_VAR_PREFIX)) {
final PyDebugValue debugValue = extend(value);
myFrameVariables.add(debugValue.getName(), debugValue);
}
}
}
Aggregations