use of com.jetbrains.python.debugger.PyDebugValue in project intellij-community by JetBrains.
the class PyViewNumericContainerAction method update.
@Override
public void update(AnActionEvent e) {
e.getPresentation().setVisible(false);
TreePath[] paths = getSelectedPaths(e.getDataContext());
if (paths != null) {
if (paths.length > 1) {
e.getPresentation().setVisible(false);
return;
}
XValueNodeImpl node = getSelectedNode(e.getDataContext());
if (node != null && node.getValueContainer() instanceof PyDebugValue && node.isComputed()) {
PyDebugValue debugValue = (PyDebugValue) node.getValueContainer();
String nodeType = debugValue.getType();
if ("ndarray".equals(nodeType)) {
e.getPresentation().setText("View as Array");
e.getPresentation().setVisible(true);
} else if (("DataFrame".equals(nodeType))) {
e.getPresentation().setText("View as DataFrame");
e.getPresentation().setVisible(true);
} else {
e.getPresentation().setVisible(false);
}
} else {
e.getPresentation().setVisible(false);
}
}
}
use of com.jetbrains.python.debugger.PyDebugValue in project intellij-community by JetBrains.
the class PyConsoleTask method setValue.
protected void setValue(String varName, String value) throws PyDebuggerException {
PyDebugValue val = getValue(varName);
myCommunication.changeVariable(val, value);
}
use of com.jetbrains.python.debugger.PyDebugValue 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);
}
}
}
use of com.jetbrains.python.debugger.PyDebugValue in project intellij-community by JetBrains.
the class PyViewNumericContainerAction method perform.
@Override
protected void perform(XValueNodeImpl node, @NotNull String nodeName, AnActionEvent e) {
Project p = e.getProject();
if (p != null && node != null && node.getValueContainer() instanceof PyDebugValue && node.isComputed()) {
PyDebugValue debugValue = (PyDebugValue) node.getValueContainer();
showNumericViewer(p, debugValue);
}
}
Aggregations