X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/launching/PHPRemoteLaunchConfigurationDelegate.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/launching/PHPRemoteLaunchConfigurationDelegate.java index 6ac355d..88f6f4b 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/launching/PHPRemoteLaunchConfigurationDelegate.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/php/launching/PHPRemoteLaunchConfigurationDelegate.java @@ -1,5 +1,8 @@ package net.sourceforge.phpeclipse.xdebug.php.launching; +import java.util.List; + +import net.sourceforge.phpeclipse.xdebug.core.IProxyEventListener; import net.sourceforge.phpeclipse.xdebug.core.XDebugCorePlugin; import net.sourceforge.phpeclipse.xdebug.core.XDebugProxy; import net.sourceforge.phpeclipse.xdebug.php.model.XDebugTarget; @@ -14,10 +17,10 @@ import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.model.IDebugTarget; -import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; +//import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; import org.eclipse.debug.core.model.LaunchConfigurationDelegate; -public class PHPRemoteLaunchConfigurationDelegate extends LaunchConfigurationDelegate implements ILaunchConfigurationDelegate { +public class PHPRemoteLaunchConfigurationDelegate extends LaunchConfigurationDelegate { public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { String projectName = configuration.getAttribute(IXDebugConstants.ATTR_PHP_PROJECT, (String)null); IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); @@ -26,12 +29,18 @@ public class PHPRemoteLaunchConfigurationDelegate extends LaunchConfigurationDel abort("Project does not exist.", null); } + List l = configuration.getAttribute(IXDebugConstants.ATTR_PHP_PATHMAP, (List) null); + if(l == null) { + abort("The project isn't properly mapped to remote.", null); + } + XDebugProxy proxy = XDebugCorePlugin.getDefault().getXDebugProxy(); proxy.start(); String ideID = configuration.getAttribute(IXDebugConstants.ATTR_PHP_IDE_ID, "testID"); if (mode.equals(ILaunchManager.DEBUG_MODE)) { IDebugTarget target = new XDebugTarget(launch, null, ideID); + proxy.addProxyEventListener((IProxyEventListener) target, ideID); launch.addDebugTarget(target); } }