From 1c05646d36c63efebead53504b2c3c757f88749b Mon Sep 17 00:00:00 2001 From: robekras Date: Sat, 22 Oct 2005 15:33:01 +0000 Subject: [PATCH] 1) Patches the variable list which is provided by DBG via PHPDBGEvalString. Gives a single space as name to the previously unnamed PHPVariable root node. This allows the VariableView to restore the variable tree. --- .../phpdt/internal/debug/core/PHPDBGInterface.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java index fc5d18e..9d40c3f 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGInterface.java @@ -427,8 +427,14 @@ public class PHPDBGInterface { evalStr = new PHPDBGEvalString (stack, serGlobals); // Process serialized variables DBGVarList = evalStr.getVariables (); - //resetHasChangedInfo (DBGVarList); // Reset the hasChanged info for all PHPVariables - //updateVariableList (DBGVarList, evalStr.getVariables ()); // Replicate the 'static' variable list and the via DBG received variable list + PHPVariable var = (PHPVariable) DBGVarList.get (0); + + if (var.getName ().equals ("")) { // The eclipse variable view cannot handle Variables which have an empty name + // when it comes to variable tree restore operation. Without a name, no restore! + var.setName (" "); // Give a name to the variable root node. Even if it is only a space :.) + } // TODO the best would be to remove the empty root node, but this would + // require a understanding and reworking of the PHPDBGEvalstring class. + return DBGVarList; // Return the variables as list } -- 1.7.1