Search in sources :

Example 11 with XValueChildrenList

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);
}
Also used : XValueChildrenList(com.intellij.xdebugger.frame.XValueChildrenList)

Example 12 with XValueChildrenList

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;
    }
}
Also used : XValueChildrenList(com.intellij.xdebugger.frame.XValueChildrenList)

Example 13 with XValueChildrenList

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;
}
Also used : XValueChildrenList(com.intellij.xdebugger.frame.XValueChildrenList)

Example 14 with XValueChildrenList

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;
}
Also used : XValueChildrenList(com.intellij.xdebugger.frame.XValueChildrenList) XValue(com.intellij.xdebugger.frame.XValue)

Example 15 with XValueChildrenList

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);
        }
    }
}
Also used : PyDebugValue(com.jetbrains.python.debugger.PyDebugValue) XValueChildrenList(com.intellij.xdebugger.frame.XValueChildrenList)

Aggregations

XValueChildrenList (com.intellij.xdebugger.frame.XValueChildrenList)16 DlvApi (com.goide.dlv.protocol.DlvApi)1 Project (com.intellij.openapi.project.Project)1 XValue (com.intellij.xdebugger.frame.XValue)1 PyDebugValue (com.jetbrains.python.debugger.PyDebugValue)1 IOException (java.io.IOException)1 ElixirVariableBinding (org.elixir_lang.debugger.node.ElixirVariableBinding)1 Nullable (org.jetbrains.annotations.Nullable)1