X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugStringValue.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugStringValue.java index 161d9f1..1204035 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugStringValue.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/model/XDebugStringValue.java @@ -1,32 +1,31 @@ package net.sourceforge.phpeclipse.xdebug.php.model; +import net.sourceforge.phpeclipse.xdebug.core.Base64; +import net.sourceforge.phpeclipse.xdebug.core.PHPDebugUtils; + +import org.eclipse.debug.core.DebugEvent; +import org.eclipse.debug.core.DebugException; import org.w3c.dom.Node; public class XDebugStringValue extends XDebugAbstractValue { - public XDebugStringValue(XDebugVariable variable, Node varNode, - String typeName) { - super(variable, varNode, typeName); - } - - public XDebugStringValue(XDebugVariable variable, String typeName) { - super(variable, typeName); - } + public XDebugStringValue(XDebugStackFrame variable, Node value) throws DebugException { + super(variable, value); + String encoding = PHPDebugUtils.getAttributeValue(value, "encoding"); + if (encoding.equals("base64")) { + rowValue = new String(Base64.decode(rowValue)); + } - public void setType(String typeName) { - fType = XDebugAbstractValue.VALUETYPE_STRING; - fTypeName = typeName; + setValueString(rowValue); } - public void renderValueString(String data) { - fValueString = "\"" + data + "\""; - } - - public boolean supportsValueModification() { + public boolean setValue(String expression) throws DebugException { + setValueString(expression); + fireEvent(new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.CONTENT)); return true; } - public boolean verifyValue(String expression) { + public boolean supportsValueModification() { return true; } -} +} \ No newline at end of file