Search in sources :

Example 1 with NodeManager

use of com.intellij.debugger.ui.tree.NodeManager in project intellij-community by JetBrains.

the class ExpressionChildrenRenderer method buildChildren.

public void buildChildren(final Value value, final ChildrenBuilder builder, final EvaluationContext evaluationContext) {
    final NodeManager nodeManager = builder.getNodeManager();
    try {
        final ValueDescriptor parentDescriptor = builder.getParentDescriptor();
        final Value childrenValue = evaluateChildren(evaluationContext.createEvaluationContext(value), parentDescriptor);
        NodeRenderer renderer = getChildrenRenderer(childrenValue, parentDescriptor);
        renderer.buildChildren(childrenValue, builder, evaluationContext);
    } catch (final EvaluateException e) {
        List<DebuggerTreeNode> errorChildren = new ArrayList<>();
        errorChildren.add(nodeManager.createMessageNode(DebuggerBundle.message("error.unable.to.evaluate.expression") + " " + e.getMessage()));
        builder.setChildren(errorChildren);
    }
}
Also used : NodeManager(com.intellij.debugger.ui.tree.NodeManager) EvaluateException(com.intellij.debugger.engine.evaluation.EvaluateException) ValueDescriptor(com.intellij.debugger.ui.tree.ValueDescriptor) BooleanValue(com.sun.jdi.BooleanValue) Value(com.sun.jdi.Value) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

EvaluateException (com.intellij.debugger.engine.evaluation.EvaluateException)1 NodeManager (com.intellij.debugger.ui.tree.NodeManager)1 ValueDescriptor (com.intellij.debugger.ui.tree.ValueDescriptor)1 BooleanValue (com.sun.jdi.BooleanValue)1 Value (com.sun.jdi.Value)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1