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);
}
}
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);
}
}
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);
}
}
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);
}
}
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));
}
}
Aggregations