Fix variable view value modification and refactored XDebugAbstractValue and derived...
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.core / src / net / sourceforge / phpeclipse / xdebug / php / model / XDebugStringValue.java
index cce3c52..58bcf24 100644 (file)
@@ -1,45 +1,27 @@
 package net.sourceforge.phpeclipse.xdebug.php.model;
 
+import net.sourceforge.phpeclipse.xdebug.core.Base64;
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
 import org.w3c.dom.Node;
 
 public class XDebugStringValue extends XDebugAbstractValue {
+       public XDebugStringValue(XDebugStackFrame variable, Node value) throws DebugException {
+               super(variable, value);
 
-       private String fDataString;
-       public XDebugStringValue(XDebugVariable variable, Node varNode,
-                       String typeName) {
-               super(variable, varNode, typeName);
-               fDataString=null;
-       }
-       
-       public XDebugStringValue(XDebugVariable variable, String typeName) {
-               super(variable, typeName);
-               fDataString=null;
-       }
-
-
-       public void setType(String typeName) {
-               fType=XDebugAbstractValue.VALUETYPE_STRING;
-               fTypeName=typeName;
+               rowValue = new String(Base64.decode(rowValue));
 
+               setValueString(rowValue);
        }
 
-       public void renderValueString(String data) {
-               fDataString=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 String toString() {
-               return null; //fDataString;
-       }*/
-
-       public boolean verifyValue(String expression) {
-               // TODO Auto-generated method stub
+       public boolean supportsValueModification() {
                return true;
        }
-
-}
+}
\ No newline at end of file