import java.util.Arrays;
import java.util.Vector;
+import net.sourceforge.phpdt.internal.debug.core.PHPDBGBase;
import net.sourceforge.phpdt.internal.debug.core.PHPDBGProxy;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.DebugEvent;
import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IRegisterGroup;
* TODO Remove the variables array and use only the varList vector
* Have also to change hasVariables
*/
-public class PHPStackFrame extends PHPDebugElement implements IStackFrame, Comparable{
-
- private PHPThread thread; // The thread to which this stackframe belongs
- private String file; // The file name???
- private int lineNumber; //
- private int index; //
- private int modno; //
- private PHPVariable[] variables; // The array of variables TODO: better introduce a vector?
- private Vector varList = new Vector ();
- private String description; // The source file name with the full path on target/remote system
- private boolean fUpToDate; // Indicates whether the variable list within this stackframe is
- // up-to-date
- private boolean fAvailable; // Needed when updating the stackframe list, shows whether the stackframe
- // is within the list which was received from dbg
+public class PHPStackFrame extends PHPDebugElement implements IStackFrame, Comparable {
+
+ private PHPThread thread; // The thread to which this stackframe belongs
+ private String file; // The file name???
+ private int lineNumber;
+ private int index;
+ private int modno;
+ private int scope_id; // scope id
+ private PHPVariable[] variables; // The array of variables TODO: better introduce a vector?
+ private Vector varList = new Vector();
+ private String description; // The source file name with the full path on target/remote system
+ private boolean fUpToDate; // Indicates whether the variable list within this stackframe is
+ // up-to-date
+ private boolean fAvailable; // Needed when updating the stackframe list, shows whether the stackframe
+ // is within the list which was received from dbg
/**
*
* @param index
* @param desc
* @param modno
+ * @param scope_id
*/
- public PHPStackFrame (PHPThread thread, String file, int line, int index, String desc, int modno) {
- super (null);
+ public PHPStackFrame(PHPThread thread, String file, int line, int index,
+ String desc, int modno, int scope_id) {
+ super(null);
- this.lineNumber = line;
- this.index = index;
- this.file = file;
- this.thread = thread;
+ this.lineNumber = line;
+ this.index = index;
+ this.file = file;
+ this.thread = thread;
this.description = desc;
- this.modno = modno;
- this.fUpToDate = false;
+ this.modno = modno;
+ this.scope_id = scope_id;
+ this.fUpToDate = false;
}
/**
}
/**
+ *
+ * @return scope id
+ */
+ public int getScopeID() {
+ return scope_id;
+ }
+
+ /**
+ *
+ */
+ public void setScopeID(int scope_id) {
+ this.scope_id = scope_id;
+ setUpToDate(false);
+ }
+
+ /**
*
*/
public IThread getThread () {
}
}
-
/**
*
* This function returns the array of PHPVariables for this stackframe
* @return The array of PHPVariables for this stackframe.
*/
public IVariable[] getVariables() throws DebugException {
- if (!isUpToDate ()) {
- resetHasChangedInfo (varList);
- updateVariableList (varList, this.getPHPDBGProxy ().readVariables (this));
- setUpToDate (true);
+ if (!isUpToDate()) {
+ resetHasChangedInfo(varList);
+ updateVariableList(varList, this.getPHPDBGProxy().readVariables(this));
+ setUpToDate(true);
- variables = (PHPVariable[]) varList.toArray (new PHPVariable[varList.size ()]);
+ variables = (PHPVariable[]) varList.toArray(new PHPVariable[varList.size()]);
Arrays.sort(variables, new PHPVariableComparator());
}
thread.prepareForResume (DebugEvent.STEP_RETURN);
this.getPHPDBGProxy ().readStepReturnEnd (PHPStackFrame.this) ;
- ev = new DebugEvent (this.getThread (), DebugEvent.RESUME, DebugEvent.STEP_RETURN);
- DebugPlugin.getDefault ().fireDebugEventSet (new DebugEvent[] { ev });
+ //ev = new DebugEvent (this.getThread (), DebugEvent.RESUME, DebugEvent.STEP_RETURN);
+ //DebugPlugin.getDefault ().fireDebugEventSet (new DebugEvent[] { ev });
}