Search in sources :

Example 6 with TextWithImports

use of com.intellij.debugger.engine.evaluation.TextWithImports in project intellij-community by JetBrains.

the class EnumerationChildrenRenderer method buildChildren.

public void buildChildren(Value value, ChildrenBuilder builder, EvaluationContext evaluationContext) {
    NodeManager nodeManager = builder.getNodeManager();
    NodeDescriptorFactory descriptorFactory = builder.getDescriptorManager();
    List<DebuggerTreeNode> children = new ArrayList<>();
    int idx = 0;
    for (Pair<String, TextWithImports> pair : myChildren) {
        UserExpressionData data = new UserExpressionData((ValueDescriptorImpl) builder.getParentDescriptor(), getClassName(), pair.getFirst(), pair.getSecond());
        data.setEnumerationIndex(idx++);
        children.add(nodeManager.createNode(descriptorFactory.getUserExpressionDescriptor(builder.getParentDescriptor(), data), evaluationContext));
    }
    builder.setChildren(children);
    if (myAppendDefaultChildren) {
        DebugProcessImpl.getDefaultRenderer(value).buildChildren(value, builder, evaluationContext);
    }
}
Also used : UserExpressionData(com.intellij.debugger.impl.descriptors.data.UserExpressionData) ArrayList(java.util.ArrayList) TextWithImports(com.intellij.debugger.engine.evaluation.TextWithImports)

Example 7 with TextWithImports

use of com.intellij.debugger.engine.evaluation.TextWithImports in project intellij-community by JetBrains.

the class EnumerationChildrenRenderer method writeExternal.

public void writeExternal(Element element) throws WriteExternalException {
    super.writeExternal(element);
    if (myAppendDefaultChildren) {
        JDOMExternalizerUtil.writeField(element, APPEND_DEFAULT_NAME, "true");
    }
    for (Pair<String, TextWithImports> pair : myChildren) {
        Element child = new Element(CHILDREN_EXPRESSION);
        child.setAttribute(CHILD_NAME, pair.getFirst());
        child.addContent(DebuggerUtils.getInstance().writeTextWithImports(pair.getSecond()));
        element.addContent(child);
    }
}
Also used : PsiElement(com.intellij.psi.PsiElement) Element(org.jdom.Element) TextWithImports(com.intellij.debugger.engine.evaluation.TextWithImports)

Example 8 with TextWithImports

use of com.intellij.debugger.engine.evaluation.TextWithImports in project intellij-community by JetBrains.

the class ExpressionChildrenRenderer method readExternal.

public void readExternal(Element element) throws InvalidDataException {
    super.readExternal(element);
    DefaultJDOMExternalizer.readExternal(this, element);
    TextWithImports childrenExpression = DebuggerUtils.getInstance().readTextWithImports(element, "CHILDREN_EXPRESSION");
    if (childrenExpression != null) {
        setChildrenExpression(childrenExpression);
    }
    TextWithImports childrenExpandable = DebuggerUtils.getInstance().readTextWithImports(element, "CHILDREN_EXPANDABLE");
    if (childrenExpandable != null) {
        myChildrenExpandable.setReferenceExpression(childrenExpandable);
    }
}
Also used : TextWithImports(com.intellij.debugger.engine.evaluation.TextWithImports)

Example 9 with TextWithImports

use of com.intellij.debugger.engine.evaluation.TextWithImports in project intellij-community by JetBrains.

the class LabelRenderer method readExternal.

public void readExternal(Element element) throws InvalidDataException {
    super.readExternal(element);
    DefaultJDOMExternalizer.readExternal(this, element);
    TextWithImports labelExpression = DebuggerUtils.getInstance().readTextWithImports(element, "LABEL_EXPRESSION");
    if (labelExpression != null) {
        setLabelExpression(labelExpression);
    }
}
Also used : TextWithImports(com.intellij.debugger.engine.evaluation.TextWithImports)

Example 10 with TextWithImports

use of com.intellij.debugger.engine.evaluation.TextWithImports in project intellij-community by JetBrains.

the class JavaStackFrame method addToChildrenFrom.

private void addToChildrenFrom(Set<TextWithImports> expressions, XValueChildrenList children, EvaluationContextImpl evaluationContext) {
    for (TextWithImports text : expressions) {
        WatchItemDescriptor descriptor = myNodeManager.getWatchItemDescriptor(null, text, null);
        children.add(JavaValue.create(descriptor, evaluationContext, myNodeManager));
    }
}
Also used : TextWithImports(com.intellij.debugger.engine.evaluation.TextWithImports)

Aggregations

TextWithImports (com.intellij.debugger.engine.evaluation.TextWithImports)13 EvaluateException (com.intellij.debugger.engine.evaluation.EvaluateException)3 TextWithImportsImpl (com.intellij.debugger.engine.evaluation.TextWithImportsImpl)2 PsiElement (com.intellij.psi.PsiElement)2 Element (org.jdom.Element)2 SourcePosition (com.intellij.debugger.SourcePosition)1 CodeFragmentFactory (com.intellij.debugger.engine.evaluation.CodeFragmentFactory)1 EvaluationContextImpl (com.intellij.debugger.engine.evaluation.EvaluationContextImpl)1 DebuggerContextCommandImpl (com.intellij.debugger.engine.events.DebuggerContextCommandImpl)1 DebuggerContextImpl (com.intellij.debugger.impl.DebuggerContextImpl)1 UserExpressionData (com.intellij.debugger.impl.descriptors.data.UserExpressionData)1 LocalVariableProxyImpl (com.intellij.debugger.jdi.LocalVariableProxyImpl)1 DebuggerTreeNodeImpl (com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl)1 Pair (com.intellij.openapi.util.Pair)1 JBTable (com.intellij.ui.table.JBTable)1 AbstractTableCellEditor (com.intellij.util.ui.AbstractTableCellEditor)1 XSourcePosition (com.intellij.xdebugger.XSourcePosition)1 XDebuggerExpressionEditor (com.intellij.xdebugger.impl.ui.XDebuggerExpressionEditor)1 XDebuggerTreeNode (com.intellij.xdebugger.impl.ui.tree.nodes.XDebuggerTreeNode)1 ArrayList (java.util.ArrayList)1