http://www.eclipse.org/legal/cpl-v10.html
Contributors:
- IBM Corporation - Initial implementation
- Vicente Fernando - www.alfersoft.com.ar
+ IBM Corporation - Initial implementation
+ Vicente Fernando - www.alfersoft.com.ar
**********************************************************************/
package net.sourceforge.phpdt.internal.debug.core.model;
+import java.util.Arrays;
import java.util.Vector;
import net.sourceforge.phpdt.internal.debug.core.PHPDBGProxy;
try {
if (valOld.hasVariables () || // If the 'static' value has child variables
- valNew.hasVariables ()) { // or if the DBG 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
+ !hasRecursion (varNew)) { // Both branches should not have a recursion
updateVariableList (valOld.getChildVariables (), // Update the variable list for the child variables
valNew.getChildVariables ());
}
if (!isUpToDate ()) {
resetHasChangedInfo (varList);
- updateVariableList (varList, this.getPHPDBGProxy ().readVariables (this));
+ updateVariableList (varList, this.getPHPDBGProxy ().readVariables (this));
setUpToDate (true);
variables = (PHPVariable[]) varList.toArray (new PHPVariable[varList.size ()]);
+ Arrays.sort(variables, new PHPVariableComparator());
}
return variables; // Give the array back to user interface
public IVariable findVariable (String s) throws DebugException {
if (!isUpToDate ()) {
resetHasChangedInfo (varList);
- updateVariableList (varList, this.getPHPDBGProxy ().readVariables (this));
+ updateVariableList (varList, this.getPHPDBGProxy ().readVariables (this));
setUpToDate (true);
variables = (PHPVariable[]) varList.toArray (new PHPVariable[varList.size ()]);
public String getName() {
StringBuffer name = new StringBuffer();
-
+
if (!this.getDescription().equals ("")) {
name.append (this.getDescription ());
}
else {
name.append (this.getFileName ());
}
-
+
name.append (" [line ");
name.append (this.getLineNumber ());
name.append ("]");
-
+
return name.toString();
}
setUpToDate (false);
- thread.prepareForResume (DebugEvent.STEP_INTO); // Don't know why, but this is necessary
+ thread.prepareForResume (DebugEvent.STEP_INTO); // Don't know why, but this is necessary
this.getPHPDBGProxy ().readStepIntoEnd (PHPStackFrame.this);
ev = new DebugEvent (this.getThread (), DebugEvent.RESUME, DebugEvent.STEP_INTO);
setUpToDate (false);
- thread.prepareForResume (DebugEvent.STEP_OVER);
+ thread.prepareForResume (DebugEvent.STEP_OVER);
this.getPHPDBGProxy ().readStepOverEnd (PHPStackFrame.this) ;
ev = new DebugEvent (this.getThread (), DebugEvent.RESUME, DebugEvent.STEP_OVER);
setUpToDate (false);
- thread.prepareForResume (DebugEvent.STEP_RETURN);
+ thread.prepareForResume (DebugEvent.STEP_RETURN);
this.getPHPDBGProxy ().readStepReturnEnd (PHPStackFrame.this) ;
ev = new DebugEvent (this.getThread (), DebugEvent.RESUME, DebugEvent.STEP_RETURN);