1 package net.sourceforge.phpeclipse.xdebug.php.model;
3 import net.sourceforge.phpeclipse.xdebug.core.PHPDebugUtils;
5 import org.eclipse.debug.core.DebugException;
6 import org.eclipse.debug.core.model.IVariable;
7 import org.w3c.dom.Node;
8 import org.w3c.dom.NodeList;
10 public class XDebugObjectValue extends XDebugAbstractValue {
11 private int NumChildren;
13 public XDebugObjectValue(XDebugStackFrame variable, Node value) throws DebugException {
14 super(variable, value);
17 if (!PHPDebugUtils.getAttributeValue(value, "numchildren").equals("")) {
18 NumChildren = Integer.parseInt(PHPDebugUtils.getAttributeValue(value, "numchildren"));
21 if (NumChildren > 0) {
22 NodeList property = value.getChildNodes();
23 IVariable[] Variables = new IVariable[property.getLength()];
25 for (int i = 0; i<property.getLength(); i++) {
26 Node propertyNode = property.item(i);
27 Variables[i] = new XDebugVariable(variable, propertyNode);
30 setChildren(Variables);
33 String className = PHPDebugUtils.getAttributeValue(value,"classname");
34 if(!"".equals(className)) {
35 setValueString(className);