X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java index 77d751e..04fb969 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/PHPDBGProxy.java @@ -17,19 +17,23 @@ import java.net.SocketTimeoutException; import java.util.Map; import java.util.Vector; +import net.sourceforge.phpdt.internal.core.JavaProject; import net.sourceforge.phpdt.internal.debug.core.breakpoints.PHPLineBreakpoint; import net.sourceforge.phpdt.internal.debug.core.model.PHPDebugTarget; import net.sourceforge.phpdt.internal.debug.core.model.PHPStackFrame; import net.sourceforge.phpdt.internal.debug.core.model.PHPThread; import net.sourceforge.phpdt.internal.debug.core.model.PHPVariable; import net.sourceforge.phpeclipse.PHPeclipsePlugin; +/*import net.sourceforge.phpeclipse.actions.PHPEclipseShowAction;*/ +import org.eclipse.core.internal.resources.Project; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.model.IBreakpoint; +import org.eclipse.swt.browser.Browser; public class PHPDBGProxy { @@ -52,7 +56,16 @@ public class PHPDBGProxy { public PHPDBGProxy () { thisProxy = this; } - + + /** + * updateView + * Clean up the view, but leave the Debug session running. + * added by ed_mann + */ + public void updateView(){ + getDebugTarget().updateThreads(PHPMainThread); + } + /** * @param remote * @param remoteSourcePath @@ -81,19 +94,18 @@ public class PHPDBGProxy { */ public void stop () { phpLoop.setShouldStop (); // Notify the thread's 'run loop' to stop - if (DBGInt != null) { // If we have a DBG interface linked with this proxy DBGInt.setShouldStop (); // Notify the DBG interface to stop the waiting for response - } - - if (!remote) { // If it's not a remote proxy session - try { - getDebugTarget ().getProcess ().terminate (); // - } catch (DebugException e) { - e.printStackTrace (); - } } +// if (!remote) { // If it's not a remote proxy session +// try { +// getDebugTarget ().getProcess ().terminate (); // +// } catch (DebugException e) { +// e.printStackTrace (); +// } +// } + phpLoop.notifyWait (); } @@ -176,6 +188,15 @@ public class PHPDBGProxy { } /** + * Get the DBG interface which is linked to this proxy + * + * @paran DBGInt The DGB interface which is linked with this proxy + */ + public PHPDBGInterface getDBGInterface () { + return DBGInt; + } + + /** * Give back a buffered input stream for the socket which is * linked with this proxy */ @@ -236,7 +257,7 @@ public class PHPDBGProxy { filename = phpLBP.getMarker().getResource().getProjectRelativePath(); filename = remoteSourcePath.append (filename); } else { - filename = phpLBP.getMarker().getResource().getLocation(); + filename = phpLBP.getMarker().getResource().getFullPath(); } String path = filename.toOSString(); @@ -263,7 +284,7 @@ public class PHPDBGProxy { localPath = new Path (local); // Get the remote/server side path of the mapping if (localPath.isPrefixOf (filename)) { // Starts the remote/server side file path with the remote/server side mapping path - // dann prefix abhängen und den remote path davorhägen + // dann prefix abh�ngen und den remote path davorh�gen newpath = filename.removeFirstSegments (localPath.matchingFirstSegments (filename)); newpath = remotePath.append (newpath); path = newpath.toString (); @@ -417,14 +438,15 @@ public class PHPDBGProxy { } /** - * + * Is called by the DebuggerRunner + * * @param debugTarget */ public void setDebugTarget (PHPDebugTarget debugTarget) { this.debugTarget = debugTarget; debugTarget.setPHPDBGProxy(this); } - + /** * This method is called by a stackframe. * It reads the variables from PHP via DBG @@ -524,7 +546,7 @@ public class PHPDBGProxy { shouldStop = false; this.setName ("PHPDebuggerLoop"); } - + /** * */ @@ -556,7 +578,6 @@ public class PHPDBGProxy { public void run () { try { int i; - int timeout; long interval = 200; // Wait 200 ms maximum for a DBG response boolean newconnect = false; // Socket newSocket = null; @@ -569,7 +590,6 @@ public class PHPDBGProxy { PHPMainThread = new PHPThread (getDebugTarget (), getPort ()); PHPMainThread.setName ("Thread [main]"); - timeout = 0; // while ((getDebugTarget() == null) && (timeout < 100)) { // sleep(100);