From: incastrix Date: Wed, 17 Sep 2008 15:06:49 +0000 (+0000) Subject: More refactory on variable/value model. X-Git-Url: http://git.phpeclipse.com More refactory on variable/value model. --- diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugAbstractValue.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugAbstractValue.java index 26e1263..9b0a57e 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugAbstractValue.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugAbstractValue.java @@ -27,7 +27,7 @@ public abstract class XDebugAbstractValue extends XDebugElement implements IVal protected String fTypeName; private boolean fhasChanged; - public XDebugAbstractValue(XDebugStackFrame frame, Node varNode) { + public XDebugAbstractValue(XDebugStackFrame frame, Node varNode) { super((XDebugTarget) frame.getDebugTarget()); fTypeName = PHPDebugUtils.getAttributeValue(varNode,"type"); @@ -74,14 +74,6 @@ public abstract class XDebugAbstractValue extends XDebugElement implements IVal return fhasChanged; } - public void sethasChanged(boolean hasChanged) { - fhasChanged = hasChanged; - } - - public void setChildVariables(IVariable[] newChildVariables) { - fVariables = newChildVariables; - } - /* (non-Javadoc) * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName() */ diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugValue.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugValue.java index fbbf9df..057d217 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugValue.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugValue.java @@ -5,11 +5,10 @@ import org.w3c.dom.Node; public class XDebugValue extends XDebugAbstractValue { public XDebugValue(XDebugStackFrame variable, Node value) { super(variable, value); - fValueString = "uninitialized"; - fTypeName = "unknown"; } public void renderValueString(String data) { + fValueString = "uninitialized"; } public boolean verifyValue(String expression) { 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..a2a0f36 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; @@ -39,19 +38,15 @@ public class XDebugVariable extends XDebugElement implements IVariable { 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; } @@ -158,12 +153,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