valNew = (XDebugAbstractValue) varNew.getValue(); // Get the value from DBG
try {
- if (valOld.hasVariables() || // If the 'static' value has child variables
- valNew.hasVariables()) { // or if the DBG value has child variables
- if (!hasRecursion(varOld) &&
- !hasRecursion(varNew)) { // Both branches should not have a recursion
- updateVariableList(
- valOld.getChildVariables(), // Update the variable list for the child variables
+ if (valOld.hasVariables() || // If the 'static' value has child variables
+ valNew.hasVariables()) { // or if the DBG value has child variables
+ if (!hasRecursion (varOld) &&
+ !hasRecursion (varNew)) { // Both branches should not have a recursion
+ updateVariableList (
+ valOld.getChildVariables(), // Update the variable list for the child variables
valNew.getChildVariables());
}
}
if (!valOld.getValueString().equals(
valNew.getValueString())) { // Has the value changed?
- valOld.setValueString(valNew.getValueString()); // Yes, set the 'static' value (variable) to the new value
- valOld.setReferenceTypeName (valNew.getReferenceTypeName ());
- varOld.setValueChanged(true); // and set the 'has changed' flag, so that the variable view
+ varOld.setValue (varNew.getValue ()); // Set 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
}
*/
public synchronized IVariable[] getVariables() throws DebugException {
- /* always read variables, poor performance
- * but this fix bug #680.
- * need to investigate on.
- */
-
if (!fUpToDate) {
Node dfl = ((XDebugTarget) getDebugTarget()).getLocalVariables(fLevel);
Node dfg = ((XDebugTarget) getDebugTarget()).getGlobalVariables(fLevel);
return (IVariable[]) varList.toArray (new IVariable[varList.size()]);
}
+ /**
+ *
+ * @param localVariables
+ * @param globalVariables
+ * @throws DebugException
+ */
private void parseVariable(Node localVariables, Node globalVariables) throws DebugException {
NodeList property = localVariables.getChildNodes();
NodeList propertyGlobal = globalVariables.getChildNodes();
}
public boolean setVariableValue(XDebugVariable variable, String expression) throws DebugException {
- return ((XDebugTarget) getDebugTarget()).setVarValue(variable.getName(), expression);
+ return ((XDebugTarget) getDebugTarget()).setVarValue(variable.getNameFull(), expression);
}
public Node eval(String expression) throws DebugException {