import java.util.Vector;
+import net.sourceforge.phpdt.internal.debug.core.PHPDebugCorePlugin;
+
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IDebugTarget;
*
* @param name
*/
- private void setName (String name) {
+ public void setName (String name) {
if ((fParent == null) || // If we have no parent for this variable
(fParent.getName () == "")) { // or we have a parent which is just a simple node ???
fLongName = name; // Set the long name
else
evalString=fLongName+"="+expression;
PHPVariable[] vars=fStackFrame.getPHPDBGProxy().eval(fStackFrame,evalString);
+
+ if (vars == null || vars.length == 0) {
+ vars = fStackFrame.getPHPDBGProxy().eval(fStackFrame, fLongName);
+ if (vars == null || vars.length == 0) {
+ // TODO code and message
+ int code = 0;
+ String msg = "Could not assign and get variable";
+ Status status = new Status(Status.ERROR,
+ PHPDebugCorePlugin.PLUGIN_ID, code, msg, null);
+ PHPDebugCorePlugin.log(status);
+ throw new DebugException(status);
+ }
+ }
+
setValue(vars[0].fValue);
}