Modified: 1764120 - Variables View doesn't show global vars in class context
authortoshihiro <toshihiro>
Mon, 13 Aug 2007 01:11:14 +0000 (01:11 +0000)
committertoshihiro <toshihiro>
Mon, 13 Aug 2007 01:11:14 +0000 (01:11 +0000)
net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPStackFrame.java

index 43b2117..fb83c89 100644 (file)
@@ -266,16 +266,14 @@ public class PHPStackFrame extends PHPDebugElement implements IStackFrame, Compa
                                                                updateVariableList(valOld.getChildVariables(), // Update the variable list for the child variables
                                                                                valNew.getChildVariables());
                                                        }
-                                               } else if (!valOld.getValueString().equals(
+                                               }
+                                               if (!valOld.getValueString().equals(
                                                                valNew.getValueString())) {             // Has the value changed?
                                                        valOld.setValueString(valNew.getValueString()); // Yes, set the 'static' value (variable) to the new value
                                                        varOld.setValueChanged(true);                   // and set the 'has changed' flag, so that the variable view
                                                                                                                                        // could show the user the changed status with a different
                                                                                                                                        // color
                                                }
-                                               //else {
-                                               //      varOld.setValueChanged (false);                                     // Reset the 'has changed' flag
-                                               //}
                                        } catch (DebugException e) {                                    // That's, because of the hasVariables method
                                        }
 
@@ -343,15 +341,14 @@ public class PHPStackFrame extends PHPDebugElement implements IStackFrame, Compa
                        try {
                                if (value.hasVariables()) {                                             // Does the variable/value have children
                                        if (!hasRecursion(variable)) {                                  // Don't follow recursive variable/values
-                                               variable = findVariable(value.getChildVariables(),
-                                                               varname);
-
-                                               if (variable != null) {
-                                                       return variable;
+                                               PHPVariable var = findVariable(value.getChildVariables(), varname);
+                                               if (var != null) {
+                                                       return var;
                                                }
                                        }
-                               } else if ((variable.getName()).equals(varname)) {      //
-                                       return variable; //
+                               }
+                               if (variable.getName().equals(varname)) {
+                                       return variable;
                                }
                        } catch (DebugException e) {                                                    // That's, because of the hasVariables method
                        }