X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java index f02a5ec..c136e76 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugVariable.java @@ -21,7 +21,6 @@ import org.w3c.dom.Node; */ public class XDebugVariable extends XDebugElement implements IVariable { private String fName; - private String fFullName; private XDebugStackFrame fFrame; private XDebugAbstractValue fValue; private String fFacet; @@ -33,25 +32,21 @@ public class XDebugVariable extends XDebugElement implements IVariable { * @param frame owning stack frame * @param name variable name */ - public XDebugVariable(XDebugStackFrame frame, Node property) { + public XDebugVariable(XDebugStackFrame frame, Node property) throws DebugException { if (frame != null ) { //super((XDebugTarget) frame.getDebugTarget()); fFrame = frame; } - String address = PHPDebugUtils.getAttributeValue(property,"address"); - fName = PHPDebugUtils.getAttributeValue(property,"name"); if ("".equals(fName)) { - fName = address; + fName = PHPDebugUtils.getAttributeValue(property,"address"); } - fFullName = PHPDebugUtils.getAttributeValue(property,"fullname"); + fFacet = PHPDebugUtils.getAttributeValue(property, "facet"); String typeName = PHPDebugUtils.getAttributeValue(property, "type"); - fFacet = PHPDebugUtils.getAttributeValue(property, "facet"); - if (typeName.equals("int") ) fValue = new XDebugIntValue(frame, property); else if (typeName.equals("float") ) @@ -83,9 +78,9 @@ public class XDebugVariable extends XDebugElement implements IVariable { * @see org.eclipse.debug.core.model.IVariable#getName() */ public String getName() throws DebugException { - if (fFullName.endsWith("]")) + /*if (fFullName.endsWith("]")) return fFullName.substring(fFullName.lastIndexOf('[')); - else + else*/ return fName; } @@ -107,18 +102,15 @@ public class XDebugVariable extends XDebugElement implements IVariable { * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String) */ public void setValue(String expression) throws DebugException { - if(fValue.setValue(expression)) { - + if (fFrame.setVariableValue(this, expression)) { + fValue.setValue(expression); } - //fireEvent(new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.CONTENT)); - //fValue.setValueA(expression); } /* (non-Javadoc) * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue) */ public void setValue(IValue value) throws DebugException { - //fValue.setValueB(value); } /* (non-Javadoc) @@ -158,12 +150,4 @@ public class XDebugVariable extends XDebugElement implements IVariable { public String getVisibility() { return fFacet; } - - public String toString() { - return null; - } - - public String getFullName() { - return fFullName; - } } \ No newline at end of file