*/
package net.sourceforge.phpeclipse.xdebug.php.model;
+import java.net.MalformedURLException;
import java.net.URL;
-//import net.sourceforge.phpeclipse.xdebug.core.Base64;
-//import net.sourceforge.phpeclipse.xdebug.core.PHPDebugUtils;
-//import net.sourceforge.phpeclipse.xdebug.core.xdebug.ResponseListener.DebugResponse;
-//import net.sourceforge.phpeclipse.xdebug.core.xdebug.ResponseListener.XDebugResponse;
-
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.DebugException;
* @param data frame data
* @param id stack frame id (0 is the bottom of the stack)
*/
- public XDebugStackFrame(XDebugThread thread, int id) {
+ public XDebugStackFrame(XDebugThread thread, int id, String type, int lineNumber, String where, /*URL*/String filename) {
super(thread == null ? null : (XDebugTarget) thread.getDebugTarget());
+
fId = id;
+ fLevel = id;
fThread = thread;
+ fType = type;
+ fLineNumber = lineNumber;
+ fWhere = where;
+
+ try {
+ fName = new URL(filename);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
}
public void incrementStepCounter() {
* @see org.eclipse.debug.core.model.IStackFrame#getName()
*/
public String getName() throws DebugException {
- //String a = fName.getFile();
- //return fName.lastSegment().toString()+"::"+fWhere+ " line: "+ fLineNumber;
return fName.toString()+"::"+fWhere+ " line: "+ fLineNumber;
}
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
-// return getSourceName().hashCode() + fId;
return getSourceName().hashCode() + fLevel;
}
*
* @return this stack frame's unique identifier within its thread
*/
- protected int getIdentifier() {
+ /*protected int getIdentifier() {
return fId;
- }
-
-
- public void setFullName(URL name) {
- fName = name;
- }
-
+ }*/
public URL getFullName() {
return fName;
return fLevel;
}
- public void setLevel(int level) {
- fLevel = level;
- fId = level;
- }
-
public String getType() {
return fType;
}
- public void setType(String type) {
- fType = type;
- }
-
public String getWhere() {
return fWhere;
}
- public void setWhere(String where) {
- fWhere = where;
- }
-
- public void setLineNumber(int newlineNumber) {
- fLineNumber = newlineNumber;
+ public boolean setVariableValue(XDebugVariable variable, String expression) throws DebugException {
+ return ((XDebugTarget) getDebugTarget()).setVarValue("$" + variable.getName(), expression);
}
}
\ No newline at end of file